OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: andrew on January 22, 2010, 11:11:17 AM

Title: is there a way to change font color
Post by: andrew on January 22, 2010, 11:11:17 AM
is there any way to change the font color of a label?

Title: Re: is there a way to change font color
Post by: owenwengerd on January 22, 2010, 11:35:16 AM
Take a look at the Foreground Color property.
Title: Re: is there a way to change font color
Post by: andrew on January 22, 2010, 11:41:44 AM
ahh nice thanks Owen

is there something else i need to do?

i changed it in the editor but it still shows black in the acad screen
Title: Re: is there a way to change font color
Post by: owenwengerd on January 22, 2010, 12:01:41 PM
Make sure you save the change, then reload the project in AutoCAD.
Title: Re: is there a way to change font color
Post by: andrew on January 22, 2010, 01:13:48 PM
Quote from: owenwengerd on January 22, 2010, 12:01:41 PM
Make sure you save the change, then reload the project in AutoCAD.

ive closed down autocad and restarted it.
still no dice.

Title: Re: is there a way to change font color
Post by: BazzaCAD on January 22, 2010, 02:35:00 PM
Worked for me on Win7, Acad2010.
Are you sure it's not loading anther version of your project?
Title: Re: is there a way to change font color
Post by: andrew on January 25, 2010, 06:15:28 AM
Quote from: BazzaCAD on January 22, 2010, 02:35:00 PM
Worked for me on Win7, Acad2010.
Are you sure it's not loading anther version of your project?


im certain its not loading another version
im using win7 acad 09
Title: Re: is there a way to change font color
Post by: owenwengerd on January 25, 2010, 06:56:21 AM
If you can attach the files, someone can take a look.
Title: Re: is there a way to change font color
Post by: andrew on January 25, 2010, 12:42:21 PM
Quote from: owenwengerd on January 25, 2010, 06:56:21 AM
If you can attach the files, someone can take a look.

sure can

if you view the odcl file its the colored text is located in form3 in the modal dialogs

if you run the program and click on the button that says "release"
that will bring up the dialog that the colored text should appear on

thanks
Title: Re: is there a way to change font color
Post by: owenwengerd on January 25, 2010, 02:54:29 PM
The label displays red as expected for me.
Title: Re: is there a way to change font color
Post by: BazzaCAD on January 25, 2010, 03:56:54 PM
When I tested with 6.0.0.16, I didn't get Red, when I tested with 6.0.0.20 I did get Red.
What version are you on? I'm guessing a bug was fixes between these versions?
I also get "error: Automation Error. Out of range" when I hit the "Release" button...

I've also noticed your "delete_confirm" & "merge_confirmation" forms are pretty much message boxes.
Do you know about the MessageBox (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Function/MessageBox.htm) function?
Title: Re: is there a way to change font color
Post by: andrew on January 26, 2010, 06:08:29 AM
hi Barry,

im using version 6.0.0.15 so maybe thats why the text isnt red.

ill have to update the files to a newer version.

yes i know about the message boxes but using the ones i made, after you press the yes or no they do a function according to the response.

thanks for checking it out.
Title: Re: is there a way to change font color
Post by: BazzaCAD on January 26, 2010, 09:48:26 AM
The Messagebox also gives return values:

Code (autolisp) Select

(setq YesNo (dcl_MessageBox "Do you want to do this?" "Warning" 5 3 nil))
(if (= YesNo 6)
  (DoYesStuff)
  (DoNoStuff)
)


OR

Code (autolisp) Select

(if (= 6 (dcl_MessageBox "Do you want to do this?" "Warning" 5 3 nil))
 (DoYesStuff)
 (DoNoStuff)
)


Return Values     Button
1       [OK]
2       [Cancel]
3       [Abort]
4       [Retry]
5       [Ignore]
6       [Yes]
7       [No]
Title: Re: is there a way to change font color
Post by: andrew on January 26, 2010, 11:45:39 AM
i didnt know that. cool
ill look into that

thanks again