Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

scriptui line wrap groups - setting location

Participant ,
Jun 13, 2019 Jun 13, 2019

I have a script I'm working on with some custom checkboxes. each set of checkboxes is wrapped in a group, and the number of them and the size of the labels are variable. The window's size is adjustable too, and I've added a scrollbar just to stress myself out further.

As of now, I've got it so that the groups show up beside each other. I'd like it to keep doing that until it runs out of room horizontally, at which point it moves down to the next line.

I realize I can wrap the groups in another group that's row oriented, and wrap those in a group that's column oriented. the problem with that is I'd have to repopulate the entire thing for every frame onResize for the window was running.

I can do this manually, but for some reason, I can't set the groups' locations. I can set the location values with a scrollbar.onChanging if I want, but setting the value once doesn't seem to do anything visually, although the property's value seems to have changed. Any reason that might be? I ran window.layout.layout(true) so I don't think that's the issue.

I'd post more of the code, but it's a huge amount. Sorry about the blanked out image, some sensitive names involved.

DIALOG.png

TOPICS
Scripting
776
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 13, 2019 Jun 13, 2019

I should add, I looked at the value of the property directly after changing it, and then after running layout.layout().

The property was updated directly after changing it, but it resets to 0 after I run layout.layout(). What's going on?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 14, 2019 Jun 14, 2019
LATEST

okay, I think I figured it out. each ui object has its own layout.layout() function. when I run it just on that group, it works fine. I was running layout.layout() on the entire window before, and that was resetting it, for some reason.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines