Simple windowed application: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 1,686: | Line 1,686: | ||
<lang futurebasic>_window = 1 |
<lang futurebasic>_window = 1 |
||
begin enum 1 |
begin enum 1 |
||
_label |
_label |
||
_clickMeBtn |
_clickMeBtn |
||
end enum |
end enum |
||
void local fn BuildWindow |
void local fn BuildWindow |
||
window _window, @"Simple Windoed Application", (0,0,366,59) |
window _window, @"Simple Windoed Application", (0,0,366,59) |
||
textlabel _label, @"There have been no clicks yet", (18,23,250,16) |
textlabel _label, @"There have been no clicks yet", (18,23,250,16) |
||
button _clickMeBtn,,, @"Click Me", (267,13,86,32) |
button _clickMeBtn,,, @"Click Me", (267,13,86,32) |
||
end fn |
end fn |
||
void local fn ButtonClicked |
void local fn ButtonClicked |
||
static long clickCount = 0 |
static long clickCount = 0 |
||
clickCount++ |
clickCount++ |
||
textlabel _label, fn StringWithFormat( @"The button has been clicked %ld times", clickCount ) |
textlabel _label, fn StringWithFormat( @"The button has been clicked %ld times", clickCount ) |
||
end fn |
end fn |
||
void local fn DoDialog( ev as long, tag as long ) |
void local fn DoDialog( ev as long, tag as long ) |
||
select ( ev ) |
select ( ev ) |
||
case _btnClick |
case _btnClick |
||
select ( tag ) |
select ( tag ) |
||
case _clickMeBtn : fn ButtonClicked |
case _clickMeBtn : fn ButtonClicked |
||
end select |
end select |
||
end select |
end select |
||
end fn |
end fn |
||