LUI (Lightweight User Interface) - Beta

Fair enough, that should work.

Alright, but what I observed for layouts in particular, is that one cannot in any case set a relative width for the widgets inside a horizontal layout (whether its own width - relative or absolute - is defined or not), or a relative height for the widgets inside a vertical layout.
The following code should illustrate this:

        layout = LUIHorizontalLayout(parent=self._root, spacing=0)
##        layout = LUIVerticalLayout(parent=self._root, spacing=0)

        layout.pos = (20, 50)

        # making the width relative only has effect with a vertical layout
        layout.width = "60%"

        # making the height relative only has effect with a horizontal layout
        layout.height = "70%"

        # the following works only with a horizontal layout
        frame = LUIFrame(height="50%", width=120, style=LUIFrame.FS_raised)

        # the following works only with a vertical layout
##        frame = LUIFrame(height=70, width="90%", style=LUIFrame.FS_raised)

        layout.add(frame)

A few more things I’m wondering about:

  • While there is already a layout.remove_cell method, are there plans to implement methods to insert, hide and show cells as well?

  • Will it be possible to add/remove specific LUISelectbox menu items?
    Also, selecting a menu item doesn’t really do anything except change the text on the LUISelectbox, so it’s necessary to execute the corresponding action afterwards. I feel it would be better if the action were carried out immediately when clicking the item, and let that action itself control what text is displayed on the LUISelectbox (e.g. to allow conditional execution of an action).
    And it might also be more useful if the call to LUISelectbox.get_selected_option() would return the menu item ID string instead of the action (since one might associate that ID string with other data).
    These considerations stem from the fact that I’d like to use the LUISelectbox as a combobox/dropdownbox and even as a menubar, since I don’t immediately see any other way to implement those. As such, some way to find out when the LUISelectbox is opened or closed would also be welcome (perhaps allow binding a handler to the left-clicking of the box itself).

  • What other events apart from “click” will we be able to bind handlers to, if any? Like “right-click” and “enter”/“leave” (e.g. for displaying tooltips)…

Okay I’m going to stop nagging you now :stuck_out_tongue: .

Thanks for reading :wink: .