blob: 4980ca144a40e1bf397f1f8ba905250c6679ad06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# This example shows several controls of NiGui.
import nigui
app.init()
var window = newWindow()
var container = newLayoutContainer(Layout_Vertical)
window.add(container)
# Add a Button control:
var button = newButton("Button")
container.add(button)
# Add a Label control:
var label = newLabel("Label")
container.add(label)
# Add a TextBox control:
var textBox = newTextBox("TextBox")
container.add(textBox)
# Add a TextArea control:
var textArea = newTextArea("TextArea\nLine 2\n")
container.add(textArea)
# Add more text to the TextArea:
for i in 3..30:
textArea.addLine("Line " & $i)
window.show()
app.run()
|