Any way to set a min width for GUI controls when using adaptWidthToChildren?

If there’s no built in way, any suggestions?

Obviously, there’s no min-width concept built-in (sadly). There might be a work-around but I believe we would first need to see how it’s built. Possible to share a PG?

3 options come to my mind:

1. Padding Adjustment

  • While attaching Child Controls: Adjust left and right padding, when child.width below min
  • consider negative padding if background of container should be kept, like in the following PG:

2. Empty Child

  • Create general GUI.Control object, set its width as minimum and attachControl() to container
  • Disadvantage: takes 1 child spot i.e. empty cell in Grid Container

3. Feature Request

  • Add additional properties for min and max measures

Here are the involving code lines:


I would actually upvote this one :+1:. But then in order to be a real step-up, it would also need to be implemented in the Gui Editor. cc @carolhmj (I think we kind of started discussing this before, together with something like @media) :sweat_smile:. Any chance for it in a near future? Thx,

Edit: I somehow remembered this thread from oct22 that’s kind of related:

I somehow remembered @PatrickRyan sayin Yours want to continue “improving the GUI and Editor”.
I don’t wanna be pushy, not my style :grin: :face_with_hand_over_mouth:… but, yeah, whilst slowly but surely moving towards v7, it may be worth considering,… is it? :thinking:


Yup it’s a good thing to have, the biggest obstacle is time :sweat_smile::rofl: @PatrickRyan is planning to take another look at GUI/GE after he wraps up the particles exploration, so there’ll be more discussion about it on the team soon-ish :slight_smile: