Benjamin Bruheim wrote:
Hello,
a) I have a TextCtrl, and when its updated I want it the scrollbar to _stay-at-the-bottom_, chat-style.
But my current implementation of this takes the size of the font to implement this, and it works below average . Are there any ways to control the scrollbars directly?
text.SetInsertionPointEnd() should do it but if not then perhaps a text.ShowPosition(text.GetLastPosition()) will.
I'm also open to suggestions for custom widgets, if anyone has any ideas.
If it's read-only text then it's real easy to draw your own text on a and be able to scroll around.
b) I haven't had any requirements to do so myself, but I've got question on how to call events directly. I guess that being "provoke events". Are there any such thing?
Do you want the event to really happen, or just have your event handler called? The former can't be done since in most cases the events come from the platform. The latter can be done by creating an instance of the right kind of wxEvent, and then calling window.GetEventHander().ProcessEvent(evt). Be warned however that in some cases you may get crashes if the event didn't really come from the platform.
···
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!