blueshake 发表于 2022-7-6 10:27:39

about dcl edit_box

hi,all
is there any way to set the font color of edit_boxby property in dcl ?
for codes below:
by default,the font color is black,how can I change it to red?thanks.

toleranc : dialog {          label = "toleranceediton";          : boxed_column {            label = "tolerance";            : edit_box {                label = "uppertolerance";                key   = "dimtp";                edit_width = 8;            }            : edit_box {                label = "downtolerance";                key   = "dimtm";                edit_width = 8;            }            spacer_1;          }          : button {            label = "restore";            key   = "comeback";          }   spacer;   ok_cancel;}

Lee Mac 发表于 2022-7-6 10:40:42

I don't think you can with standard DCL, take a look here and perhaps try OpenDCL:

http://www.cadtutor.net/forum/showthread.php?52498-Mode-less-dcl-dialog&p=355722&viewfull=1#post355722

blueshake 发表于 2022-7-6 10:51:25

thank you for your reply,I will try it.

Lt Dan's l 发表于 2022-7-6 10:55:18

I believe Lee is correct.
But for giggles you may want to try http://web2.airmail.net/terrycad/Tutorials/MyDialogs.htm#MyBoldText
 
and use
color = //whatever #
under the
: text {
I'm away from cad so I cannot test this myself

Lee Mac 发表于 2022-7-6 11:06:20

 
That will be the background - but it is interesting that you can do that with image_tiles.

Lt Dan's l 发表于 2022-7-6 11:15:39

I thought it probably wouldn't work but I figure its worth the try. There's some really cool things on his site.

Lt Dan's l 发表于 2022-7-6 11:27:24

Lee,
I wanted to ask and I'll probably will start a new thread so this doesn't get confusing. How do you figure out the vector_image #'s? I used terry's program but it seems it doesn't get all of the objects I select.
 
This is quite the dcl morning!

Lee Mac 发表于 2022-7-6 11:34:51

The vector images numbers are the coordinates of the vector start/end x/y values, relative to the dialog box tile coordinate system.
 

(vector_image x1 y1 x2 y2 colour)Hence all objects must be approximated by a series of vectors and the coordinates of the endpoints of such vectors translated relative the the dialog tile in which the origin is the top left corner.
 
You can also get the dimensions of the tile so that you know the viewing limits of the tile coordinate system using dimx_tile and dimy_tile. With this information you can scale the coordinates of your objects to fit within the tile.
 
There are quite a few program out there that will calculate the vectors, Terry's being one of them. I've also written one that gives me a little extra control over the alignment of the image in the tile.
 
Lee
页: [1]
查看完整版本: about dcl edit_box