How to change a button image
Tassadar
Posts: 11
On my panel i have a button with 1.jpg on off state bittmap and 2.jpg on on state bittma, I want changes оff bittmaps before one click on this button. Sorry for bad english
0
Comments
The first is to make your button a "multi-state-general" button instead of a general button. This way you can add states to your button, in your case 3 states.
You will have to change the states with the ANI command:
Syntax:
"'^ANI-<vt addr range>,<start state>,<end state>,<time>'"
Variable:
variable text address range = 1 - 4000.
start state = Beginning of button state (0= current state).
end state = End of button state.
time = In 1/10 second intervals.
Example:
SEND_COMMAND Panel,"'^ANI-500,1,25,100'"
Runs a button animation at text range 500 from state 1 to state 25 for 10 second.
The second way is to change the image for state "off" with the ^BMP command, but I don't think its a recomended way(in my opinion its a bit too complex to such a simple use)