Jump to content

How to scroll an edit to the bottom line?


Recommended Posts

There's a few ways.

This will move the scroll bar

_GUICtrlRichEdit_SetScrollPos($hWnd, $iX, $iY)

If you don't mind moving the caret

Local $iEditLength = StringLen(GUICtrlRead(Edit Control))
_GUICtrlEdit_SetSel(Handle to the edit control, $iEditLength, $iEditLength)
_GUICtrlRichEdit_ScrollToCaret(Handle to the edit control)

There's also this, you'd have to throw this in a loop [n] amount of times.

; Like you pressed Page Down
_GUICtrlEdit_Scroll($hWnd, $SB_PAGEDOWN)
; or using $SB_LINEDOWN [n] could just be the number of lines to the bottom
_GUICtrlEdit_Scroll($hWnd, $SB_LINEDOWN)

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...