Textboxes : i need help

so, I need help with textboxes.
I want to make a input field for like a notes plugin
I already have an idea of what the textbox should act.

But I need help with that.
the textbox is parented to a scrollingframe that automatically adjusts its canvas to the textbounds of the textbox. but thats not the problem.
The problem is, the user who lets say, moves down with their cursor below of the canvas, I want the scrollingframe to adjust to that cursor.

my problem: if the cursor moves out of the bounds, it will adjust the canvasposition to that cursor (ex. if I move below the canvas, the canvasposition will be adjust so that the cursor is at the bottom of the canvas but visible.)

Is this about the textbox or the ScrollingFrame?

Could you draw a (probably bad) visual of what you’re trying to accomplish?

1 Like

I cant draw :sob: but I can demonstrate.
lets say you open a google document.
spam enter to make two pages.
now ONLY use the arrow keys to navigate up and down.
Thats what I’m trying to achieve

Sorry for the late response.

You can achieve your desired goal by simply not using a ScrollingFrame and not using AutomaticScaling, however that sacrifices the ability to scroll without the cursor.

If you really want to have both, then you will need a script.

Make sure TextBox.EmitUpAndDownArrowEvents is set to true
Count pixels using TextSize.
Turn on TextBox.WrappedText so that lines don’t overflow causing you to count the x axis
Finally, code it

I really want both man.
I’m trying my hardest to figure it out.

my best thought is to just listen for user input and if they press enter(enum.KeyCode.Return) move the scrolling frame down to where they are typing.