20,741
edits
m (→Replacing native PUI widgets with Canvas widgets: removing this: no longer need, widget support has considerably improved since then ...) |
|||
Line 59: | Line 59: | ||
Canvas dialogs are definitely the way to go, as they are far more flexible and will replace PUI in the future. Since I think FG 2.11 you can create canvas dialogs with window decoration, including a title bar allowing to drag the window around and a close icon: | Canvas dialogs are definitely the way to go, as they are far more flexible and will replace PUI in the future. Since I think FG 2.11 you can create canvas dialogs with window decoration, including a title bar allowing to drag the window around and a close icon: | ||
< | <syntaxhighlight lang="nasal"> | ||
var dlg = canvas.Window.new([400,300], "dialog") | var dlg = canvas.Window.new([400,300], "dialog") | ||
.set("title", "My Canvas Dialog..."); | .set("title", "My Canvas Dialog..."); | ||
</ | </syntaxhighlight> | ||
The existing XML dialogs can still be used and will also be usable in the future (by a backwards compatibility layer or some migration path). | The existing XML dialogs can still be used and will also be usable in the future (by a backwards compatibility layer or some migration path). |