Value stuck even before max_value reached

Godot Version

Godot 3.3

Question

Hi. made this account for the express purpose of asking this question. I have an issue where my scrollcontainer’s v_scroll is hard stuck at 1908 even though the max_value is 2750, and its preventing me from scrolling all the way to the bottom.

here is a link to a video displaying the issue. help pls

1 Like

Hi,

Can we see your code where you declare your variables :slight_smile: ?

1 Like

which variables would you like to see?

I do this towards the end of my _ready() function to declare max_value:

$ScrollContainer.get_v_scrollbar().max_value = 2750
1 Like

Oh sorry, I think I misunderstood the video clip.

I assume that we observe the “value” property being updated in the distant inspector when you scroll through the game in Debug.

If you manually set the “value” property field in your distant inspector to 2750, does it work ? (I assume it will be clamp to 2750 - page (300) = 2450).

Whether it is clamp at 2450 or 1908, we will have a starting point for debugging :slight_smile:

1 Like

it sets to 2750 very briefly before being clamped to 2156. I’ve also discovered that despite setting the page field in my script to any other number, it gets set to 594.

1 Like

And when you manually set the value field (which is then clamp to 2156), does it reach the end of the scrollbar (do you see all of the latest cards)?

Likewise, does the scrollbar also crash if you use the scrollbar cursor rather than the mouse wheel?

Sorry for all the questions and no solutions yet, I’m trying to understand where the problem could come from

1 Like

What happens if you raise the max_value?
Add 100 to the max_value and see if the v_scroll gets stuck at 2008.

1 Like

have a look at this video:

while it does reach the end of the content, the scroll has a bit of overhang that the grabber cannot go to. theoretically if i set the page to 0, that would resolve the issue, but as I mentioned previously, that field (and all other scroll properties) get set to some other number when I either touch the scroll bar or or resize the window. I’m quite certain I do not have any code that would cause this to happen.

to answer your other question, the scrollbar does not crash when I use either the scrollbar or the mouse wheel.

1 Like

I am unable to do this, as once I set max_value to 2850, the second I touch the scrollbar it gets reset to 2750.

1 Like

Then your code must be resetting it.
If this line runs then of course it gets reset:

$ScrollContainer.get_v_scrollbar().max_value = 2750
1 Like

I removed that line before I tested that, and it still occurred.

1 Like

Are you using a VScrollBar inside a ScrollContainer?
The image shows the properties of a VScrollBar but your code is says $ScrollContainer

1 Like

Yeah I’m using a ScrollContainer

1 Like

A ScrollContainer has its own scroll bar. You don’t add a VScrollBar to it.

ScrollContainer

A container used to provide a child control with scrollbars when needed. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal)

1 Like

I didnt manually add a scroll bar though. what you’re seeing in the remote inspector is when I click on the v_scroll automatically generated by the scrollcontainer.

image

1 Like

Ok, I get it. (My mistake)
In that case it must be code that is resetting your max.
You can test this by adding another scroll container that isn’t linked to existing node/code.

1 Like

Looking at it some more it might have something to do with the Control as a child.
Can you show your scene tree under the ScrollContainer?
When using a Control as a child of the ScrollContainer you have to set the CustomMinimumSize property of the Control.
What do you have that set at?

1 Like

it goes quite a ways deeper, but im not sure if you want all that. image

also, do you mean rect_min_size? i have that set at (1300, 2750) for the control node.
also also, I sifted through all scripts relevant to the scene I’m in, and none seem to be manipulating any properties. I’ve also tested creating a new scrollcontainer in a different scene, and the issue still persists (being unable to set properties without them immediately switching to a different value).

1 Like

No that doesn’t sound right.

Select the Control under the ScrollContainer.
In the inspector under Layout, their is a property called Custom_Minimum_Size x, y.
Set that y to a value higher than 2750.

1 Like

sorry for the late response. got pretty busy these last couple days.

that property does not exist in the Control node. the closest I can get is rect_min_size. while changing this value does increase the depth of the scrolling, I am still left with a visual error where the scroll goes down farther than the grabber can.

1 Like