| View previous topic :: View next topic |
| Author |
Message |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Tue May 28, 2002 11:42 am Post subject: Change Style |
|
|
Hi again,
is there a way to change a style (ex. change fontcolor) ?
Or is there a way to give an textobject another style ?
I tried both but dont get it running.
Thank you again,
Fabian |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Tue May 28, 2002 4:00 pm Post subject: |
|
|
_____________________________________________________________
Here's an axample of changing styles. Some elements
don't accept all style changes.
| Code: |
OPTION SCALE, 96
OPTION DECIMALSEP, "."
TITLE By Mac
DIALOG CREATE,Test prog,-1,0,200,100
DIALOG ADD,STYLE,Style0,,,B
DIALOG ADD,STYLE,Style1,Wingdings,12,B
DIALOG ADD,STYLE,Style2,Courier New,12,B,YELLOW,RED
DIALOG ADD,BUTTON,B0,5,5,50,20,"Test",,Style0
DIALOG ADD,BUTTON,B1,5,60,30,30,@chr(48),,Style1
DIALOG ADD,BUTTON,B2,5,100,30,30,@chr(49),,Style1
DIALOG ADD,TEXT,T1,50,5,,," This is a test ",,Style2
DIALOG SHOW
:EVLOOP
WAIT EVENT
goto @event()
:B0BUTTON
:B1BUTTON
:B2BUTTON
goto EVLOOP
:CLOSE
EXIT
|
_________________ 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 |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Tue May 28, 2002 4:45 pm Post subject: Change Style |
|
|
Hi,
thank you for you answer.
You misunderstood me.
I mean is there a way to change the values of an existing style ?
Thanx again.
Bye, Fabian |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Tue May 28, 2002 5:34 pm Post subject: |
|
|
Oops, sorry.
You must remove the element and add it again
with a different style (the style should already
exist.)
| Code: |
OPTION SCALE, 96
OPTION DECIMALSEP, "."
TITLE By Mac
DIALOG CREATE,Test prog,-1,0,200,100
DIALOG ADD,STYLE,Style1,Arial,12,B,LTGREEN,DKBLUE
DIALOG ADD,STYLE,Style2,Courier New,12,B,YELLOW,RED
DIALOG ADD,BUTTON,B1,5,5,80,20,"Change Style"
DIALOG ADD,TEXT,T1,50,5,,," This is a test ",,Style1
DIALOG SHOW
%s = 1
:EVLOOP
WAIT EVENT
goto @event()
:B1BUTTON
if @equal(%s, 1)
%s = 2
else
%s = 1
end
DIALOG REMOVE, T1
DIALOG ADD,TEXT,T1,50,5,,," This is a test ",,Style%s
goto EVLOOP
:CLOSE
EXIT
|
_________________ 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 |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Tue May 28, 2002 6:07 pm Post subject: Change Style |
|
|
Hi and thanx again.
Yes, this is the way i do it at this time.
There seems to be no way to remove a style or change
a style or the style of a text.
Thanx,
Fabian |
|
| 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
|
|