AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Multi-Line Edit Control Prevent Scrolling on update

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
TodWulff



Joined: 29 Dec 2007
Posts: 99

PostPosted: Thu Apr 17, 2008 3:50 am    Post subject: Multi-Line Edit Control Prevent Scrolling on update Reply with quote

Hey folks.

Question Is there a way to prevent a multi-line edit control from scrolling when text is added to it? Question

If I do a SEND to the control, the control sets the cursor to the bottom of the edit box, just as if the user was typing therein (duh), but if I do a CONTROLSETTEXT, then it resets the control and places the cursor at the top of the control's contents.

My goal is this: I have a multiline edit control which is the console for a serial based device. It is all working as desired, except for this one feature of the console...

I'd like the edit control to auto-scroll if the scroll bar is at the bottom, when new lines of text are received, but I'd like to freeze the text displayed, if the user scrolls up to a specific portion of the previously received text - i.e. the scroll bar is anywhere but at the bottom of the control. Newly received characters should append to the trailing end of the control's text, but when in this non-auto-scrolling mode, the position of the displayed text doesn't change.

Does anyone have any code they can let me make use of, so that I don't have to reinvent the wheel here, or can offer up some suggested code, so that I could implement same?

Please review and advise. Thank you, in advance. Take care.

-t
_________________
When replying, please feel free to address me as Tod or t. My AHK.net site...
Back to top
View user's profile Send private message
Laszlo



Joined: 14 Feb 2005
Posts: 4016
Location: Pittsburgh

PostPosted: Sun Apr 20, 2008 12:01 am    Post subject: Reply with quote

Look into this thread for an example on how to manipulate an edit control by sending system messages.
Back to top
View user's profile Send private message
TodWulff



Joined: 29 Dec 2007
Posts: 99

PostPosted: Sun Apr 20, 2008 12:15 am    Post subject: Reply with quote

Thanks Laszlo, I'll take a peek.!.

-t
_________________
When replying, please feel free to address me as Tod or t. My AHK.net site...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group