m
no edit summary
m (catfix, Replaced: {{widgethandler}} → {{widgethandler}}<br>) |
mNo edit summary |
||
| Line 13: | Line 13: | ||
== Example == | == Example == | ||
Say we have a plain textbox inside a scrollframe (inside [[UIPanelScrollFrameTemplate]]; as the only child-element, etc.), the following code will automatically move scrollframe viewport so that the cursor is inside it. | Say we have a plain textbox inside a scrollframe (inside [[UIPanelScrollFrameTemplate]]; as the only child-element, etc.), the following code will automatically move scrollframe viewport so that the cursor is inside it. (The | ||
ScrollingEdit_OnUpdate() function in UIPanelTemplates.lua does something akin to this also.) | |||
<OnCursorChanged> | <OnCursorChanged> | ||
local vs = this:GetParent():GetVerticalScroll(); | local vs = this:GetParent():GetVerticalScroll(); | ||