Changing state question.
udi
Posts: 107
I want to do an icon that have 3 state (open,close,stop). And I want that when I will press a buttons the state will change Respectively to the buttons.
For example if I press the stop button the icon will change to stop icon, and if I press the open button the icon will change to open icon.
I managed to do so by using a button that has no icon and using the command:
SEND_COMMAND dvTP,"'^ICO-500,1&2,158'"
The code looks like this:
SWITCH (WIN_CHANEL_BUTTONS[index])
{
//Master
CASE bt_WIN_Master_Open:
{
SEND_COMMAND dvTP,"'^ICO-500,1&2,158'"
}
CASE bt_WIN_Master_Close:
{
SEND_COMMAND dvTP,"'^ICO-500,1&2,159'"
}
CASE bt_WIN_Master_Stop:
{
SEND_COMMAND dvTP,"'^ICO-500,1&2,160'"
}
}
Is this a good way or there is a better way?
Thanks for any help
For example if I press the stop button the icon will change to stop icon, and if I press the open button the icon will change to open icon.
I managed to do so by using a button that has no icon and using the command:
SEND_COMMAND dvTP,"'^ICO-500,1&2,158'"
The code looks like this:
SWITCH (WIN_CHANEL_BUTTONS[index])
{
//Master
CASE bt_WIN_Master_Open:
{
SEND_COMMAND dvTP,"'^ICO-500,1&2,158'"
}
CASE bt_WIN_Master_Close:
{
SEND_COMMAND dvTP,"'^ICO-500,1&2,159'"
}
CASE bt_WIN_Master_Stop:
{
SEND_COMMAND dvTP,"'^ICO-500,1&2,160'"
}
}
Is this a good way or there is a better way?
Thanks for any help
0
Comments