| View previous topic :: View next topic |
| Author |
Message |
yolodrew Newbie
Joined: 09 Mar 2009 Posts: 5 Location: Tehachapi, CA
|
Posted: Thu Apr 16, 2009 11:52 pm Post subject: Change dialog element font or style on resize |
|
|
I am running VDS 5.02 and have a question regarding dialog resize.
I have a table element that has a style attached to it that sets the font size of the table to 8pt. Is there any way, upon a resize of the dialog, to increase the font size to say 12pt? I've looked but can't find anyway to do so. I can resize the table using dialog setpos, but of course it retains the original style.
If I could delete the table dialog element and then recreate it that would be great, but it looks like I can only do a dialog hide or dialog disable on elements, which doesn't allow me to recreate the dialog element with a different style applied.
Any suggestions are much appreciated.
Thank you,
Andrew |
|
| Back to top |
|
 |
cnodnarb Professional Member


Joined: 11 Sep 2002 Posts: 766 Location: Eastman, GA
|
Posted: Fri Apr 17, 2009 2:00 am Post subject: |
|
|
Create another dialog element.
Hide one, show the other. |
|
| Back to top |
|
 |
DaveR Valued Contributor


Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Sat Apr 18, 2009 8:13 am Post subject: Re: Change dialog element font or style on resize |
|
|
| yolodrew wrote: | | If I could delete the table dialog element and then recreate it that would be great, |
At any time you can use 'dialog remove' to remove elements and 'dialog add' to add new elements. But font styles don't work on table elements.
| Code: |
DIALOG CREATE,New Dialog,-1,0,280,200
DIALOG ADD,STYLE,STYLE1,Courier New,10,BC,DKBLUE,WHITE
DIALOG ADD,STYLE,STYLE2,,18,,RED,BLUE
DIALOG ADD,TABLE,TABLE1,3,3,274,154,Table 1 Column 1[160]|Table 1 Column 2[110],STYLE1
list add,table1,This is the original table@tab()with 2 columns
DIALOG ADD,TEXT,TEXT1,169,65,150,18,Style 1,,STYLE1
DIALOG SHOW
wait 4
dialog remove,table1
DIALOG ADD,TABLE,TABLE1,3,3,274,154,New Table Column 1[130]|Column 2[70]|Column 3[70],STYLE2
list add,table1,
list add,table1,
list add,table1,This is the new table@tab()with three@tab()columns
dialog remove,text1
DIALOG ADD,TEXT,TEXT1,164,65,150,28,Style 2,,STYLE2
wait event
stop
|
_________________ cheers
Dave |
|
| Back to top |
|
 |
yolodrew Newbie
Joined: 09 Mar 2009 Posts: 5 Location: Tehachapi, CA
|
Posted: Sun Apr 19, 2009 3:31 am Post subject: |
|
|
Thank you both for the suggestions. I had considered using dialog hide table, but was looking for a quicker solution that didn't involve too much rewrite of my code, but now I don't think it will be too much work.
The dialog remove function does work for the table, however I've placed the table on top of a line element, and am still trying to work out a few issues. Amazingly "dialog remove" is never mentioned in the VDS 5.02 help manual under the command reference for the dialog command.
I am able to apply font styles to my table that work fine with different fonts and font sizes, not sure if it doesn't work in some versions but it works fine for me in version 5.02 at least.
I've got a little work ahead of me, but I very much appreciate both of your suggestions. It sure is nice to have a helpful community like this.
Thank you!
Andrew |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|