Ok, let’s roll up our sleeves and get to this!
It’s often rare to want to do this as the layouts take care of a lot of the stuff. For root level windows it’s quite common, though. Best approach, ask the window what it’s preferred size is, Math.min() whatever values you want against your minimum preferred size, then set it back.
Either in styling (the easy way) or directly with code by setting your own cell renderer.
You can see how the ListBox is setup in the glass style. You’d set a fontSize in the list.item styling:
In it’s current configuration, it inherits the default from the root glass style.
It is on my to-do list. I think a few others have cobbled some things together.
Only recently has this become particularly easy since there is now a built in way to handle popups. So now it’s just a matter of combining a Label or TextField with a button and a pop-up list box.
GuiGlobals.getInstance().requestFocus(null); …if you have no better place to go.
Either set them directly:
Or in styling:
addClickCommands() is a convenience function that essentially calls:
The available hooks are here:
Hide but still participate in layout… JME’s regular cull hint.
Hide from even the layout… I think only removing the child.
But if you just mean like to show/hide a root window, then that’s regular JME stuff. Just remember that all Lemur GUI elements are just spatials.
Or did you mean something else?
You can set the margin on the background component and it will achieve the same effect… assuming the background component supports a margin (in this case it does).
But either way, you can add whatever you want to the component stack for a GUI element. Insets are applied before background only because that’s the order they are in the stack.
Still, 99% of the time (like in the glass style) you will have a QuadBackgroundComponent or a TbtBackgroundComponent… and both of those support setting a margin (they pretty much have to).
Hope that helped a little.
Edit: P.S.: I wish that discourse would show better links for the wiki links above… that last link jumps right into the component stack documentation but you’d never know it from that view.