#Why does my ScrollingFrame not let me scroll all the way up, if the text inside of it is too large?

1 messages · Page 1 of 1 (latest)

prisma pendant
#

I have a problem, that if I input too large of a text into my textlabel the scrollingFrame can sometimes not scroll all the way up.
I have sat the AutomaticCanvasSize of the ScrollingFrame and the AutomaticSize of the TextLabel inside. Here's the snippet that inserts the text:

local function getTextBounds()
        local text = history
        local maxWidth = output.AbsoluteSize.X
        local bounds = TXTS:GetTextSize(text, 14, Enum.Font.RobotoMono, Vector2.new(maxWidth, math.huge))
        return bounds
    end
    -- Print the formattedResponse and increase output size if neccesarry
    for _, element in ipairs(formattedResponse) do
        history ..= element
        output.Text = history
        if not output.TextFits then
            local bounds = getTextBounds()
            local boundsY = bounds.Y

            local sizeY = boundsY * 1.3
            output.Size = UDim2.new(1, 0, 0, sizeY)
            output.Parent.CanvasSize = UDim2.new(0, 0, 0, sizeY)
        end
        task.wait()
    end

Here's a video about what's happening. (The TextBox you're typing in is invisible.) ||(And yes i am making linux in roblox 💀)||

radiant widget
#

Have you tried adding padding?

prisma pendant
radiant widget
dusky dockBOT
#

studio** You are now Level 1! **studio

prisma pendant
radiant widget
#

Yup

#

Did you set the values?

#

There should be something like padding top

prisma pendant
#

Yes. Are they maybe too small?

#

The ones sat are PaddingLeft and PaddingTop

prisma pendant
radiant widget
#

Yeah make the padding top a bit bigger

#

I also used an uilistlayout which helped in my case

#

I had multiple elements inside tho

prisma pendant
#

Yea thats what im thinking

#

tho increasing paddingtop makes it look ugly, but i can just move the GUI up a bit too

radiant widget
#

Something else must be the issue then ig

prisma pendant
radiant widget
#

Isnt it what i just said