int ButtonSetxy(int bt, int x, int y);
Set a button's position on the screen.
Return Value
Return value is not used.
Parameters
bt Button handle returned from ButtonAdd().
x x coordinate.
y y coordinate.
Remarks
The ButtonSetxy() function changes the position of a button.
Availability
Available in DragonFireSDK 1.4 and later.
Example
This example will create a Button and set its position to 0, 0. Pressing the button will move the button a little each time it is pressed.
#include "DragonFireSDK.h"
int bt; int bx=0; int by=0;
int OnButton(int id) { bx+=10; by+=10; ButtonSetxy(bt,bx,by); return(id); }
void AppMain() { bt=ButtonAdd("Images/Button",bx,by,OnButton,1); }
void AppExit() {
}
void OnTimer() {
} |