Page 1 of 1

wxTextCtrl unexpected scoll

Posted: Sun Nov 06, 2005 3:10 pm
by Lamego
Hello,
I am using a text ctrol created with the following properties:

Code: Select all

    m_chat = new wxTextCtrl(this, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize,
      wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH2 | wxTE_AUTO_URL );
Compiled and running on linux (wxGTK) when a new line is appended to the window it behaves as I expect, it just keeps the new text on the bottom after scrolling wihout any side effects.
On Windows (wxMSW) when the text control gets full, at each new message the window is entirely scrolled up so that the text control visible area gets empty.

Any idea on how to resolve this ? (

I can try to resrcoll the window after appending the text, to make all the last text visible, but eventually there is a way to set the same behavior that I have with wxGTK ...

Posted: Sun Nov 06, 2005 6:31 pm
by sethjackson
You might try taking out wxTE_RICH2. I have a text control that doesn't have this flag and it works just fine.

colors

Posted: Mon Nov 07, 2005 9:09 am
by Lamego
I need colors on the text according to different events so I do need rich text. If I am unable to resolve this I will switch to a html windor or move to a list control (picture+text).
Altough I have several options to change the control I would like to understand/resolve this problem, I may need to use it later on another program.

Posted: Mon Nov 07, 2005 10:35 am
by leio
Or you might consider making sure that the sf.net bug tracker knows about this...

Posted: Tue Nov 08, 2005 10:09 am
by chris
Hi,

that bug has been reported for nearly three years:

http://sourceforge.net/tracker/index.ph ... tid=109863.

I've been running into this, too. The suggested ScrollLines(-1) workaround doesn't work for me neither.

Chris