int PushButtonSetVisible(int bt, int flag);
Set a push button visible or invisible, by default it is visible.
Return Value
Return value is not used.
Parameters
bt Push button handle returned from PushButtonAdd().
flag Visibility state of the view. 0 = invisible, 1 = visible.
Remarks
The PushButtonSetVisible() function changes the visibility of a push button.
Availability
Available in DragonFireSDK 1.1 and later.
Example
This sample puts two push buttons on the screen and pressing one toggles the visibility of the other.
#include "DragonFireSDK.h"
int bt1; int bt2; int bt1v=1; int bt2v=1;
int OnButton(int id) { if (id==1) { bt2v=!bt2v; // Toggle bt2v flag PushButtonSetVisible(bt2, bt2v); } else if (id==2) { bt1v=!bt1v; // Toggle bt1v flag PushButtonSetVisible(bt1, bt1v); } return(id); }
void AppMain() { bt1=PushButtonAdd("Images/Button",10,10,OnButton,1); bt2=PushButtonAdd("Images/Button",100,10,OnButton,2); }
void AppExit() {
}
void OnTimer() {
} |