Jump to content

Need an autoscrolling Edit Control


boaty
 Share

Recommended Posts

So I'm still working on my IM program, and actually it's all done. I just need to add some cosmetic niceties. Anyways, I constantly update the text of an Edit control like this:

GUICtrlSetData($EditRecv, GUICtrlRead($EditRecv) & @CRLF & $SendText)

The problem is, whenever I do so, the edit control defaults to all the way to the top. I'd like it to default at the bottom...

Anyway around this?

Link to comment
Share on other sites

Function _GUICtrlEdit_Scroll_GUICtrlEdit_Scroll($hWnd, $iDirection)

$hWnd = your edit control.

$iDirection =

$SB_LINEDOWN - Scrolls down one line

$SB_LINEUP - Scrolls up one line

$SB_PAGEDOWN - Scrolls down one page

$SB_PAGEUP - Scrolls up one page

$SB_SCROLLCARET - Scrolls the caret into view

Include Function _GUICtrlEdit_ScrollScrollBarConstants.au3

Best bet for handling situations like this in the future, check out the help file and look for all functions dealing with the control you're using. Most likely, someone has thought of exactly what you need and has provided a nice, clean way for you to get at it.

Link to comment
Share on other sites

or... you could also use _GuiCtrlEdit_AppendText ()

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...