Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,35 @@
|
|||
import Nanoquery.Util.Windows
|
||||
|
||||
// define the necessary objects
|
||||
$w = new("Window")
|
||||
$b = new("Button")
|
||||
$l = new("Label")
|
||||
|
||||
$b.setParent($w)
|
||||
$l.setParent($w)
|
||||
|
||||
// define the amount of clicks
|
||||
$clicks = 0
|
||||
|
||||
// a function to update the label
|
||||
def updateLabel($caller, $event)
|
||||
global $clicks
|
||||
global $l
|
||||
|
||||
$clicks = $clicks+1
|
||||
$l.setText(str($clicks))
|
||||
|
||||
global $clicks = $clicks
|
||||
end
|
||||
|
||||
// prepare the components to be displayed
|
||||
$w.setSize(200,200)
|
||||
$b.setText("click me")
|
||||
$b.setPosition(0,100)
|
||||
$l.setText("There have been no clicks yet")
|
||||
|
||||
// set the button's event handler to the function updateLabel
|
||||
$b.setHandler($updateLabel)
|
||||
|
||||
// show the window
|
||||
$w.show()
|
||||
Loading…
Add table
Add a link
Reference in a new issue