Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / [BlueGUI] Auto scrolling text/edit box?

Author
Message
Lucy
17
Years of Service
User Offline
Joined: 19th Apr 2007
Location: Roanoke, VA USA
Posted: 7th Dec 2007 13:21
I\'m trying to make a chat log, but I\'m having to put all new text at the top of the text box instead of the bottom because I can\'t seem to figure out how to cause the box to automatically scroll to the bottom when new text is added.

I\'ve tried explaining this concept to others and they don\'t seem to get what I\'m trying to say. Yes, you can manipulate scroll bars in BlueGUI, that\'s not the issue. The issue at hand is the text DISPLAY. If the chat log extends below the current viewed area of the log, it does not scroll at all, it just sits there and lets the scroll bar climb up the side to keep the text display in the same place.

Imagine if on IRC or instant messages or any other chat, every time someone said something, you had to reach over to your scroll bar with the mouse and manually pull it down to the bottom of the log. That gets annoying and simply going \"Oh scrollbar, scrolly downy, hurr\" in BlueGUI doesn\'t make the text scroll down.

I appologise for the harsness of tone in the following paragraph, it\'s only because I know it\'s bound to happen and I don\'t want you to waste your time or mine: Please, only working examples, not BS such as \"Oh just do this\". If you don\'t KNOW how to do it and only have an IDEA of how it MIGHT be done, DON\'T REPLY. I don\'t like having to repeat myself OVER AND OVER AND OVER that \"this method doesn\'t work because I\'ve already tried it.\" Unless you can provide a working solution, I don\'t give a crap.

Methods I have tried:

* Setting the text selection to the last character. Setting the text selection position seems to have no effect on the scrollingness of the text.

* Using scrollbar commands on the text box. No effect.

* Attaching a scrollbar to the text box as a child of the text box and manipulating the child scrollbar. It seems to have no effect whatsoever other than to make a disabled scrollbar show up before the text expands below the viewable area of the text box.

The above three methods so far have not panned out.

When the power of love overcomes the love of power, the world will know peace.
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 10th Dec 2007 15:00 Edited at: 10th Dec 2007 15:02


And it works. The problem is that your rich edit isn't activated while changing the selection start position.
Add activateGadget handle before you change the selection position with setSelStart handle, position.

If you don't want to lose focus of another gadget, you can store the previous activated gadget, and reactivate it afterwards.

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Lucy
17
Years of Service
User Offline
Joined: 19th Apr 2007
Location: Roanoke, VA USA
Posted: 14th Mar 2008 18:09
Thanks a bunch Sven. Sorry for taking so long to get around to thanking you.

When the power of love overcomes the love of power, the world will know peace.

Login to post a reply

Server time is: 2024-09-08 03:19:27
Your offset time is: 2024-09-08 03:19:27