Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,31 @@
|
|||
import gui
|
||||
$include "guih.icn"
|
||||
|
||||
class SimpleApp : Dialog (label)
|
||||
|
||||
# -- automatically called when the dialog is created
|
||||
method component_setup()
|
||||
# create and add the label
|
||||
label := Label("label=There have been no clicks yet","pos=50%,33%", "align=c,c")
|
||||
add (label)
|
||||
|
||||
# create and add the button
|
||||
button := TextButton("label=Click me", "pos=50%,66%", "align=c,c")
|
||||
button.connect(self, "clicked", ACTION_EVENT)
|
||||
add (button)
|
||||
|
||||
# some cosmetic settings for the window
|
||||
attrib("size=180,70", "bg=light gray")
|
||||
end
|
||||
|
||||
method clicked ()
|
||||
static count := 0
|
||||
count +:= 1
|
||||
label.set_label ("Clicked " || count || " times")
|
||||
end
|
||||
end
|
||||
|
||||
procedure main()
|
||||
local d := SimpleApp ()
|
||||
d.show_modal()
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue