| View previous topic :: View next topic |
| Author |
Message |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Aug 11, 2002 8:28 pm Post subject: help with dialog ADD,STYLE commands |
|
|
hello all
i have been playing with this:
dialog ADD,STYLE,STYLE2,Arial,8,B,
my question is how can i make it a different color? i don't understand this style command, i read in the help file that you can chnage backgrd color, etc. but i don't follow it to well
some one please explain this more
thanks
ps what i want to do is chnage the color of by buttons and the color of the program mian box |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun Aug 11, 2002 9:05 pm Post subject: |
|
|
Hi,
I don't think it would be possible to change the colors of buttons, however there are alternatives, such as creating colored buttons as an image and then using the CLICK style to make the click event.
Depending on what VDS Version you have, you can create diffrerent colors for your forms.
If you have VDS 3 or below, you should make a STYLE and place a TEXT over the entire form as follows:
| Code: | DIALOG CREATE,Form,-1,0,240,157
DIALOG ADD,STYLE,STYLE_NAME,,,,GREEN,
DIALOG ADD,TEXT,BACKGROUND,0,0,240,158,,STYLE_NAME
DIALOG ADD,BUTTON,BUTTON1,65,72,,BUTTON1
DIALOG SHOW
WAIT EVENT |
If you have VDS 4 or above, you can make it colored by simply doing: | Code: | | DIALOG CREATE,Form,-1,0,240,157,COLOR <<YOUR COLOR>> |
Hope this helps.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sun Aug 11, 2002 9:17 pm Post subject: |
|
|
Here's an example style (DKBLUE background, WHITE text),
make sure the font you select is available in the size chosen:
DIALOG ADD,STYLE,Style1,Arial,8,B,DKBLUE,WHITE
DIALOG ADD,TEXT,T1,5,5,,," This is a test ",,Style1
It won't change colors on buttons, but it will change their font.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Mon Aug 12, 2002 12:07 am Post subject: |
|
|
While you can't change the colors of the BUTTON, you can change the
font of the BUTTON.
Also, you can change the color and font color of the BITBTN, but you
can't change the font.
| Code: | REM -- VDS 3.x Code
DIALOG CREATE,New Dialog,-1,0,240,160
DIALOG ADD,STYLE,STYLE1,,6,,DKRED,WHITE
DIALOG ADD,GROUP,GROUP1,26,28,180,84,,STYLE1
DIALOG ADD,BITBTN,BITBTN1,40,46,64,22,,BITBTN1
DIALOG SHOW
WAIT EVENT
STOP |
The BITBTN defaults to the style of the GROUP. |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Aug 12, 2002 12:23 am Post subject: |
|
|
Hey Garrett,
Changing the group style (as in your example), DOES
affect the BITBTN font (or was that what ya meant?)...
| Code: |
OPTION SCALE, 96
OPTION DECIMALSEP, "."
DIALOG CREATE,New Dialog,-1,0,200,100
DIALOG ADD,STYLE,STYLE1,COURIER NEW,12,B,,LTGREEN
rem -- For VDS3
DIALOG ADD,GROUP,GROUP1,0,0,200,100,,STYLE1
rem -- For VDS4
rem DIALOG ADD,GROUP,GROUP1,0,0,200,100,,,STYLE1
DIALOG ADD,BITBTN,B1,30,60,80,24,,Button," This is a Button "
DIALOG SHOW
WAIT EVENT
EXIT
|
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361

Last edited by Mac on Mon Aug 12, 2002 7:35 am; edited 3 times in total |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Aug 12, 2002 12:39 am Post subject: |
|
|
Lol, here's a trip. Having the GROUP close, makes the
BITBTN recessed to start with... 8O
| Code: |
OPTION SCALE, 96
OPTION DECIMALSEP, "."
DIALOG CREATE,New Dialog,-1,0,200,100
DIALOG ADD,STYLE,STYLE1,COURIER NEW,12,B,,LTGREEN
rem -- For VDS3
DIALOG ADD,GROUP,GROUP1,0,0,200,100,,STYLE1
rem -- For VDS4
rem DIALOG ADD,GROUP,GROUP1,0,0,200,100,,,STYLE1
DIALOG ADD,BITBTN,B1,30,60,80,24,,Button," This is a Button "
DIALOG SHOW
WAIT EVENT
EXIT
|
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361

Last edited by Mac on Mon Aug 12, 2002 7:36 am; edited 3 times in total |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Mon Aug 12, 2002 12:45 am Post subject: |
|
|
That is odd, even more odd is the fact that neither the font or color changes for me..
Is it just me? _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Mon Aug 12, 2002 12:47 am Post subject: |
|
|
Of course, Mac is using VDS 3.
For VDS 4 use (minor change in Mac's code):
| Code: |
OPTION SCALE, 96
OPTION DECIMALSEP, "."
DIALOG CREATE,New Dialog,-1,0,200,100
DIALOG ADD,STYLE,STYLE1,COURIER NEW,12,B,,LTGREEN
rem -- Must use a group to change the font --
DIALOG ADD,GROUP,GROUP1,29,59,82,26,,,STYLE1
DIALOG ADD,BITBTN,BITBTN1,30,60,80,24,,BITBTN1
DIALOG SHOW
WAIT EVENT
EXIT
|
|
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Aug 12, 2002 12:48 am Post subject: |
|
|
If you are using VDS 4 or above, you need to add another comma to where the style is specified. If you aren't, I don't know.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Mon Aug 12, 2002 12:49 am Post subject: |
|
|
Oh, stupid me..forgot the space for the tooltip. _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Mon Aug 12, 2002 12:54 am Post subject: thanks |
|
|
| BUT can i chagne the basckground color? if so please re-explain that thnaks |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Aug 12, 2002 12:58 am Post subject: |
|
|
You can change the color of the group. Add another
color in the examples I posted, such as this:
DIALOG ADD,STYLE,STYLE1,COURIER NEW,12,B,YELLOW,LTGREEN
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Mon Aug 12, 2002 1:27 am Post subject: hummmm |
|
|
group? i guess i don't follow what you mean by a group?
thanks |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Mon Aug 12, 2002 1:30 am Post subject: btw |
|
|
i tried some of the examples on here and they didn't work for me  |
|
| Back to top |
|
 |
Protected Valued Contributor


Joined: 02 Jan 2001 Posts: 228 Location: Portugal
|
Posted: Mon Aug 12, 2002 1:40 am Post subject: |
|
|
You can search "group" in the user guide\help file of VDS Notice that there is code here for vds 3.x, other for vds 4.x . vds 4.x has a field in each control line for the tooltip text, so if you run 3.x code in vds 4, it assumes the first style is the tooltip... |
|
| 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
|
|