COMPONENT-text-input.sleela
examples/gui/COMPONENT-text-input.sleela · 21 line(s) · sleela
#sleela 2.5
class TextInputComponents {
int main() {
SLUserInterface ui = new SLUserInterface(); ui.configure("com.mearvk.examples.TextInput");
if (!ui.open()) { return 1; }
SLTheme theme = new SLTheme(); theme.white();
SLWindow win = ui.openWindow("Text and Input", 620, 480, theme.handle());
SLWidget root = win.rootWidget();
SLBox col = new SLBox(); col.vertical(root, 12); col.setMarginAll(18);
SLHeading heading = new SLHeading(); heading.createIn(col, "Account details", 22);
SLLabel userLabel = new SLLabel(); userLabel.createIn(col, "User name");
SLEntry user = new SLEntry(); user.createIn(col, "Enter user name");
SLLabel searchLabel = new SLLabel(); searchLabel.createIn(col, "Search");
SLSearchEntry search = new SLSearchEntry(); search.createIn(col, "Find settings");
SLLabel passwordLabel = new SLLabel(); passwordLabel.createIn(col, "Password");
SLPasswordEntry password = new SLPasswordEntry(); password.createIn(col, "Password");
SLLabel hint = new SLLabel(); hint.createIn(col, "Password field masks glyphs on screen; application code still handles its value.");
win.show(); return ui.run();
}
}