Skip to content

Commit 32cbc70

Browse files
author
Fuji, Goro
committed
add TextField and Button components
1 parent 0ecb75d commit 32cbc70

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

example/hello.jsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ class MyApp extends ui.Application {
2424
view.addSubview(new ui.Label("first").toCenter());
2525
view.addSubview(new ui.Label("second").toCenter());
2626
view.addSubview(new ui.Label("third").toCenter());
27+
28+
var t = new ui.TextField("John");
29+
view.addSubview(t);
30+
31+
var b = new ui.Button("click me!", function (e) {
32+
dom.window.alert("my name is " + t.getValue());
33+
});
34+
view.addSubview(b);
2735
}
2836
}
2937

0 commit comments

Comments
 (0)