|
shazara Beginner
Joined: 17 Feb 2003 Posts: 16 Location: USA
|
Posted: Wed Apr 13, 2005 11:46 am
Btncol for Toggle button |
Toggle buttons!
Is there a way to change the background and foreground colors of both the ON state and the OFF state in one command? |
|
|
|
Private Adept
Joined: 10 Jan 2002 Posts: 264 Location: USA
|
Posted: Wed Apr 13, 2005 2:06 pm |
#BUTTON button {off} {#show Button ON} {on} {#show Button OFF} {} {1} {} {} {} {} {} {} {} {76} {34} {} {} "" {} {} {}
This will create a button that says "off" in red on a dark red background,
when clicked it will SHOW Button on, and chand to saying "on" in green
with a dark green background. (76 and 34 colorcodes)
if you wanted to change an already defined button... there isnt a pretty way i know of, but you could do the following on this example button...
#UNBUTTON button
then
#BUTTON button {off} {#show Button ON} {on} {#show Button OFF} {} {1} {} {} {} {} {} {} {} {110} {25} {} {} "" {} {} {button}
to re-add it as a yellow and blue (110 and 25 colorcodes) button... it flickers the window a bit, but works. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Apr 14, 2005 3:58 am |
No, other than what Private did there's no way to color more than one state of a button with just one command. However, if you store your color in a variable and then use the variable to color the button you really only need one command in both states to maintain the color you want in each.
#call %btncol(name, @backcol, @forecol)
The assignation of the variables would occur in whatever trigger/alias/etc you wanted to mark the event. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|