Обновление примера с checkbox.
This commit is contained in:
parent
55f0c61970
commit
2a8362d098
1 changed files with 5 additions and 0 deletions
|
|
@ -25,8 +25,13 @@ final class Simple : ScreenBase
|
||||||
auto okBtn = new Button(3, 2, "OK", () => ScreenAction.push(new Simple()));
|
auto okBtn = new Button(3, 2, "OK", () => ScreenAction.push(new Simple()));
|
||||||
auto cancelBtn = new Button(3, 9, "Cancel", () => ScreenAction.pop(ScreenResult.none()));
|
auto cancelBtn = new Button(3, 9, "Cancel", () => ScreenAction.pop(ScreenResult.none()));
|
||||||
|
|
||||||
|
auto disableOk = new Checkbox(4, 2,"Disable OK", false, (checked) {
|
||||||
|
okBtn.setEnabled(!checked);
|
||||||
|
});
|
||||||
|
|
||||||
_ui.add(okBtn);
|
_ui.add(okBtn);
|
||||||
_ui.add(cancelBtn);
|
_ui.add(cancelBtn);
|
||||||
|
_ui.add(disableOk);
|
||||||
}
|
}
|
||||||
|
|
||||||
override ScreenAction handleGlobal(ScreenContext context, KeyEvent event)
|
override ScreenAction handleGlobal(ScreenContext context, KeyEvent event)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue