I’ve encountered an issue with the RichTextCtrl. The problem is that the Enter key switches focus instead of inserting a newline. Here is a bit of code that produces the bug on Windows. To see it, focus on the RichTextCtrl and hit enter.
I've encountered an issue with the RichTextCtrl. The problem is that the Enter key switches focus instead of inserting a newline. Here is a bit of code that produces the bug on Windows. To see it, focus on the RichTextCtrl and hit enter.
Turn off the wx.TAB_TRAVERSAL style of the panel by passing style=0 to its constructor.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I have two panels within a Splitter in my application. Should I change
the style parameter in both of their construction calls to zero? I
tried that, and it doesn't seem to change the situation.
···
On 6/18/07, Robin Dunn <robin@alldunn.com> wrote:
Saketh wrote:
> I've encountered an issue with the RichTextCtrl. The problem is that the
> Enter key switches focus instead of inserting a newline. Here is a bit
> of code that produces the bug on Windows. To see it, focus on the
> RichTextCtrl and hit enter.
Turn off the wx.TAB_TRAVERSAL style of the panel by passing style=0 to
its constructor.
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
Saketh wrote:
> I've encountered an issue with the RichTextCtrl. The problem is that the
> Enter key switches focus instead of inserting a newline. Here is a bit
> of code that produces the bug on Windows. To see it, focus on the
> RichTextCtrl and hit enter.
Turn off the wx.TAB_TRAVERSAL style of the panel by passing style=0 to
its constructor.
I have two panels within a Splitter in my application. Should I change
the style parameter in both of their construction calls to zero? I
tried that, and it doesn't seem to change the situation.
The splitter window is also considered a control container, so it will handle navigation keys too, but I don't think it can't be turned off. Looks like another way to fix it is to give the richtext control a style of wx.WANTS_CHARS. This will tell the system to give it events for all the keystrokes and then its internal key event handlers will see the Enter key before it has a chance to be turned into a navigation event.
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!