[2.0.64] tabbed-pane width changing per-tab?

Place to get help with not working mods / modding interface.
User avatar
hgschmie
Fast Inserter
Fast Inserter
Posts: 129
Joined: Tue Feb 06, 2024 5:18 am
Contact:

[2.0.64] tabbed-pane width changing per-tab?

Post by hgschmie »

I have a mod with a GUI window whose main component is a tabbed-pane. In each tab, there is a vertical frame that contains a scroll pane, which in turn contains a table.

Each of these scroll panes may have a different width. However, the window only resizes on the scroll pane in the first tab. Any change in the content here, increases or decreases the width of the window while in the other tabs, the table within the scroll pane resizes but not the scroll pane itself.

First pane:
Screenshot 2025-08-16 at 21.40.02.png
Screenshot 2025-08-16 at 21.40.02.png (61.58 KiB) Viewed 136 times
Second pane:
Screenshot 2025-08-16 at 21.40.11.png
Screenshot 2025-08-16 at 21.40.11.png (54.67 KiB) Viewed 136 times
Both look the same in the GUI view:
Screenshot 2025-08-16 at 21.43.11.png
Screenshot 2025-08-16 at 21.43.11.png (505.84 KiB) Viewed 136 times
but when I look at the table (which is inside the scroll pane), then the tables have different widths.

First pane:
Screenshot 2025-08-16 at 21.44.50.png
Screenshot 2025-08-16 at 21.44.50.png (473.56 KiB) Viewed 136 times
Second pane:
Screenshot 2025-08-16 at 21.45.16.png
Screenshot 2025-08-16 at 21.45.16.png (339.99 KiB) Viewed 136 times
My assumption was that when the users switches tabs, the content of the window would resize as well. But it seems that the overall size of the tabbed-pane is controlled by the largest content in any pane.

Can that be changed? Or is it a limitation of the GUI components?
Osmo
Fast Inserter
Fast Inserter
Posts: 118
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Re: [2.0.64] tabbed-pane width changing per-tab?

Post by Osmo »

That is the behaviour of tabs and you can't control it.
You can however recreate the tab system, by using buttons and a frame
User avatar
hgschmie
Fast Inserter
Fast Inserter
Posts: 129
Joined: Tue Feb 06, 2024 5:18 am
Contact:

Re: [2.0.64] tabbed-pane width changing per-tab?

Post by hgschmie »

Thanks. I expected as much. I won't bother reimplementing. :-)
Post Reply

Return to “Modding help”