Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I turn Textbox Autoscrolling On/Off?

16 views
Skip to first unread message

Russ Ryba

unread,
Jan 17, 2005, 2:12:15 AM1/17/05
to
I'm working on a chat application. Right now when text is updated, it
auto-scrolls so the most recent text is always shown. I would like to
allow the users to use the scroll-bar to browse backwards through the
saved text, but every time new text comes in the textbox jumps back down
to the new text.

I guess I have two questions then.

1. Is there a property, or message I can send that will make the textbox
only scroll when I want it to?
2. Is there a way to detect the position of the scrollbar? I want to
know if it is at the bottom or not so I can set auto-scroll on or off.


Sergey Bogdanov

unread,
Jan 17, 2005, 3:12:06 AM1/17/05
to
You may control vertical scrollbar by using the WM_VSCROLL message. Here
is small example that demonstrates it:
http://www.sergeybogdanov.com/Samples/TextBoxVScrollBar.zip

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com

Russ Ryba

unread,
Jan 17, 2005, 10:37:09 AM1/17/05
to
Thanks Sergey,

I downloaded you example - except that it seems to be an empty shell
program. All I see is a simple form with a textbox that appears to be
entirely created using the Windows Forms Designer.

I'll look up WM_VSCROLL though, thanks for the info.

- Russ

Sergey Bogdanov

unread,
Jan 17, 2005, 2:20:13 PM1/17/05
to
Ouch. I've just updated to correct version.

Alex Feinman [MVP]

unread,
Jan 18, 2005, 1:07:03 PM1/18/05
to
Russ,

See if this helps:
http://blog.opennetcf.org/afeinman/PermaLink,guid,7e8df78c-a583-4b35-ae5d-02207210ab40.aspx

--
Alex Feinman
---
Visit http://www.opennetcf.org
"Russ Ryba" <rus...@ryba.net.example.com> wrote in message
news:u57efPG$EHA....@TK2MSFTNGP12.phx.gbl...

0 new messages