Board index » cppbuilder » TMemo

TMemo

Hi,

    how can I set the "active" line of a TMemo component to the last line?
The Memo has a vertical scrollbar. But, I want it to automatically show the
last lines. Is that possible? Thanks in advance.

Greetings,
Ramses Matabadal

 

Re:TMemo


Well if u want it to auto scroll, i think the damn thing already does that.
It makes me nuts, I want it to scroll down but not if the user is looking at
a different line, but it scrolls anyways down to the last line =(

Well, I'm not entirely sure, but at least with me, it does that
automatically and I don't see a property responsable for it. If you don't
want the user to be able to scroll up, you can always disable the scroll
bars, by setting the ScrollBars property to ssNone.

I suppose a possible way to do it, and this is with or without scroll bars,
is everytime the data changes in the object, see if the cursor is on the
last line, and if it is not, have it scroll to the bottom, but like i said,
i could be wrong, myne goes automatically. Just trying to give you some
venues to explore if no one else gets to ya fast enough. Good luck.

~Fission

Re:TMemo


You are fast indeed :-)

    Well, since the memo is used for logging events. I just have the newest
event inserted at the first line.

    Thanks, for the ssNone-tip anyway :-)

Greetings,
Ramses Matabadal

Doctor Fission <fiss...@nightfission.com> schreef in berichtnieuws
3b56e0de_2@dnews...

Quote
> Well if u want it to auto scroll, i think the damn thing already does
that.
> It makes me nuts, I want it to scroll down but not if the user is looking
at
> a different line, but it scrolls anyways down to the last line =(

> Well, I'm not entirely sure, but at least with me, it does that
> automatically and I don't see a property responsable for it. If you don't
> want the user to be able to scroll up, you can always disable the scroll
> bars, by setting the ScrollBars property to ssNone.

> I suppose a possible way to do it, and this is with or without scroll
bars,
> is everytime the data changes in the object, see if the cursor is on the
> last line, and if it is not, have it scroll to the bottom, but like i
said,
> i could be wrong, myne goes automatically. Just trying to give you some
> venues to explore if no one else gets to ya fast enough. Good luck.

> ~Fission

Re:TMemo


Memo1->SelStart = Memo1->GetTextLen();
SendMessage(Memo1->Handle, EM_SCROLLCARET, 0, 0);

Gambit

Quote
Ramses Matabadal <r.mataba...@planet.nl> wrote in message

news:3b56db6b_2@dnews...

Quote
>     how can I set the "active" line of a TMemo component to the last line?
> The Memo has a vertical scrollbar. But, I want it to automatically show
the
> last lines. Is that possible? Thanks in advance.

Other Threads