ScrollingFrame And TextButtons Problem with CanvasSize

  1. What do you want to achieve?
    Moving TextButtons in my ScrollingFrame properly

  2. What is the issue?
    When selecting the textbutton with my mouse and moving it upwards it teleports to the bottom of the scrollingframe
    This only seems to happen when you have a CanvasSize bigger than 0 (Try 5 or 10)

  3. What solutions have you tried so far?
    Messing around with properties, creating another screen gui, another scrollingframe, another textbutton, searching in google, asking other devs (My friend said this problem happens to him as well) and searching in the devforum

To replicate the problem simply insert a ScreenGui in StarterGui
Add a ScrollingFrame and make the CanvasSize for example “5”
Add a TextButton
Try to move the TextButton

1 Like

Try adding a UIListLayout to the scrolling frame, setting the padding offset to around 10, and setting the HorizontalAlignment and VerticalAlignment to Center

You may need to adjust the canvas size of the scrolling frame

If you don’t want to use a UIListLayout, just edit the positions through the properties tab. The position of ui elements uses scale, which basically dictates the fraction of how “close to the end” the ui element is.

1 Like

In the studio it looked good, but then in-game I appear at the start of the scrolling frame (even though in the studio it’s perfect, and I can see the Textlabels).

And yes, I adjusted the canvas size, so it looks good, but as I said, in-game, it’s not the same.

Both of the options (Modifing the position in the properties or UIListLayout) are possible solutions, but I’m searching for more efficient ways.

Do you know how I could report the initial problem as a bug btw?

The distance your ui is moved is increased because a scrolling frame is basically a bigger frame displayed in a smaller window. The position property of ui elements uses scale, which takes the bigger frame into account, and just the window you can see. Not a bug.

Inconsistencies in the scrolling frame could be caused by your window shrinking??? I think you can use AbsoluteCanvasSize to automatically adjust the scrolling frame’s canvas size??? Not quite sure.

set the padding scale to a number in scale, not offset this might fix it