PageRenderTime 42ms CodeModel.GetById 35ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/script_binding/lua/demo3.lua

http://ftk.googlecode.com/
Lua | 26 lines | 19 code | 7 blank | 0 comment | 0 complexity | 4a6af406ac7f3b3d1f67d83138d70881 MD5 | raw file
 1function OnQuit(button)
 2	Ftk.Quit()
 3	print("button_quit_on_clicked")
 4	return 0
 5end
 6
 7Ftk.Init(1, {"demo2"})
 8win=FtkAppWindow.Create()
 9w=win:Width()
10h=win:Height()
11
12label=FtkLabel.Create(win, 0, 0, w, 30);
13label:SetText("Hello");
14
15entry=FtkEntry.Create(win, 0, 50, w, 30);
16entry:SetText("It is ok.");
17
18button=FtkButton.Create(win, w/4, h/2, w/2, 50);
19button:SetText("Quit")
20button:SetClickedListener("OnQuit");
21
22win:SetText("Hello FTK!")
23win:ShowAll(1)
24Ftk.Run()
25
26