Skip to main content
Tilles
Inspiring
August 14, 2021
Question

ScriptUI responsive buttons

  • August 14, 2021
  • 1 reply
  • 329 views

hi people,
I'm trying to do a simple thing in a ScriptUI panel.
I have a bunch of square buttons in a row, but I want them to break line depending on the windows width.

You know, just like kBar, ft_Toolbar, ShapeLayer toolbar, etc.
I messed around with column and row orientation, diferent alignments, but with no luck.
Any ideias?
thanks

This topic has been closed for replies.

1 reply

Mylenium
Legend
August 14, 2021

You need to defien an auto-layout group and put all elements in there.

 

Mylenium

Tilles
TillesAuthor
Inspiring
August 14, 2021

hi Mylenium. thanks for your reply.

As I understand, the auto-layout object is created by default when you create a container.
I'm using the methods 'resize' and 'layout', of the layout property. But the default AutoLayoutManager doesn't seem to behave like the example a gave you above.