I am creating a widget that is built of widgets. If I make a dialog window its fairly straightforward, as I can attach a box layout to the dialog, and just start adding widgets.
But when making a widget, I create a root group, which is seems to be a canvas group, where layouting is not enabled. How do I attach a layout? Or is there a better way to do this?
Here is a snippet of my faulty code:
- Code: Select all
# A failure panel
DefaultStyle.widgets.failure = {
new: func(parent, cfg)
{
me._root = parent.createChild("group", "failure");
me._vbox = VBoxLayout.new();
me._root.setLayout(me._vbox); # this does not work of-cause