btncol
Syntax: %btncol(button[,back,fore])
Changes and returns the color of a button. The button parameter can be button number or id. If the color is not specified, the current button color attribute is returned. In place of back,fore you can also specify the same color attribute number that is returned.
You can also use %btncol to change the color of a gauge.
Examples:
Create a button:
#BUTTON 1 test test
Set the button color to green text on blue background
#NOOP %btncol(1,blue,green)
To display the button color (the result is 18 in this case):
#SHOW %btncol(1)
Or, set the color directly with a numeric color value. In this case, we add a text color of green, plus a highlight value, plus a blue background color together:
#MATH newcol %color(green)+%color(hi)+%color(0,blue)
#NOOP %btncol(1,@newcol) |