Thread

How do you make a textbok automatically scroll down? (Bots)

How do you make a textbok automatically scroll down? // Bots

1  |  

barbarossa

May 11, 2001, 9:43pm
To: All Avid Users Of AW:
This may sound like a stupid question, but how do you make a textbox to
automatically scroll down when more text is added to it?

Owner of the K bot,
Barbarossa 315942

tony m

May 11, 2001, 10:22pm
Erg! Barbarossa, I had the code to do this once... gimme an hour, and
I'll email you if I remember it.

[View Quote]

brant

May 11, 2001, 11:38pm
If perchance, Tony didn't get you the code, it's pretty simple. Just
say something like:

Text1.SelStart = Len(Text1.Text)

The SelStart property sets the starting point of the selected text in
the text box, or the cursor position if no text is selected. The code
above moves the cursor to the last letter of the text box.

moria

May 12, 2001, 5:00am
Just an additional thing here..

Make sure you have set the box to have scrollbars on it, otherwise I think
you will go to the end of the text but you wont see it, because the text box
will fill up from the top and the selstart/ seltext will put you beyond the
visible area if you have a lot of text accumulating there:)

I prefer, rather than using text boxes to use the RTF control.. okay so its
another control to compile, but you can do a lot more with RTF controls for
editing etc that with a plain text box, but the selstart/seltext thing
works with RTF as well.

Moria


[View Quote]

tony m

May 12, 2001, 5:04am
Completely lost touch with VB brant; didn't get it until after you
posted.

[View Quote]

xelag

May 12, 2001, 8:28am
Text boxes have a very low capacity and were causing me errors, I use RTF
controls. You need to periodically remove the first strings anyway.

XelaG

[View Quote]

grimble

May 12, 2001, 9:08am
heh heh ... I sense another question coming very soon ....

Grims

[View Quote]

xelag

May 12, 2001, 6:15pm
MaxLines := ChatLines + 100;
if (RichEdit .Lines.Count > MaxLines) then
while (RichEdit .Lines.Count > ChatLines)
and (RichEdit .Lines.Count > 0) do RichEdit .Lines.Delete(0);

in Pascal :)

I delete 100 lines at one go, as you see... ChatLines is a fixed maximum
(say 500), but I allow 100 more. When it passes that, I chop of to reduce
the number of lines to Chatlines.

XelaG

[View Quote]

1  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn