- Edited
How do you force a ScrollContainer to update its scrollbars? Neither update()
nor queue_sort()
have any effect.
In my case, I have a TextureRect as a child of a ScrollContainer. Whatever size the TextureRect happens to be at the time of the ScrollContainer's _ready()
callback is accommodated correctly; scrollbars are generated and allow panning over the area covered by that TextureRect child as expected.
However, if the size of the TextureRect changes, the scrollbars do not update to match the new area. If the TextureRect starts out smaller than the ScrollContainer, no scrollbars ever appear even after being resized to be larger than the ScrollContainer. If the TextureRect starts out at a given size that is larger than the ScrollContainer, the scrollbars appear and correctly match that size but ignore subsequent changes.
Is there a way to force a ScrollContainer to update?
If there is not, my next idea is to "prime" the container with an erroneous extra-large size to ensure the scrollbars are generated, and then manually adjust the parameters of the scrollbars themselves: however I don't really understand what the scrollbar's parameter's do. The Docs imply that the page
property needs to be changed but to what and if anything else needs to be changed, I don't know. How does page
and the other range properties work for scrollbars?