forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


help with dialog ADD,STYLE commands
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Aug 11, 2002 8:28 pm    Post subject: help with dialog ADD,STYLE commands Reply with quote

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 Sad

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
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sun Aug 11, 2002 9:05 pm    Post subject: Reply with quote

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. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sun Aug 11, 2002 9:17 pm    Post subject: Reply with quote

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 Smile

_________________
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
View user's profile Send private message Send e-mail
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Mon Aug 12, 2002 12:07 am    Post subject: Reply with quote

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
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Mon Aug 12, 2002 12:23 am    Post subject: Reply with quote

Hey Garrett, Smile

Changing the group style (as in your example), DOES
affect the BITBTN font (or was that what ya meant?)... Confused
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 Smile

_________________
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
View user's profile Send private message Send e-mail
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Mon Aug 12, 2002 12:39 am    Post subject: Reply with quote

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 Smile

_________________
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
View user's profile Send private message Send e-mail
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Mon Aug 12, 2002 12:45 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Mon Aug 12, 2002 12:47 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Aug 12, 2002 12:48 am    Post subject: Reply with quote

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. Confused
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Mon Aug 12, 2002 12:49 am    Post subject: Reply with quote

Oh, stupid me..forgot the space for the tooltip.
_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Mon Aug 12, 2002 12:54 am    Post subject: thanks Reply with quote

BUT can i chagne the basckground color? if so please re-explain that thnaks
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Mon Aug 12, 2002 12:58 am    Post subject: Reply with quote

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 Smile

_________________
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
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Mon Aug 12, 2002 1:27 am    Post subject: hummmm Reply with quote

group? i guess i don't follow what you mean by a group?

thanks
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Mon Aug 12, 2002 1:30 am    Post subject: btw Reply with quote

i tried some of the examples on here and they didn't work for me Sad
Back to top
View user's profile Send private message
Protected
Valued Contributor
Valued Contributor


Joined: 02 Jan 2001
Posts: 228
Location: Portugal

PostPosted: Mon Aug 12, 2002 1:40 am    Post subject: Reply with quote

You can search "group" in the user guide\help file of VDS Smile 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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group