[wxruby-users] Enter key issue with RichTextCtrl
Alex Fenton
alex at pressure.to
Thu Nov 6 06:36:04 EST 2008
Hi Chauk-Mean
Chauk-Mean P wrote:
> I'm trying to use RichTextCtrl available with wxRuby 1.9.9 instead of
> TextCtrl and the Enter key does not work (as what I expect).
> With TextCtrl (with Wx::TE_MULTILINE), the Enter key creates a new line of text.
> With RichTextCtrl, the Enter key changes the focus to another widget.
>
Thanks for reporting this. I tried it out on OS X with my little
RichText sample, where the widget is created with the default style and
has no special event handling. The Enter key works as I'd expect - i.e.
inserts a new line.
Do you perhaps have an event handler defined that you need to call skip
on the event so that it's passed for normal processing?
> I saw a workaround for wxPython with the style WANTS_CHARS but there
> is no such constant in wxRuby.
Are you sure? It definitely seems to be available as Wx::WANTS_CHARS,
with the value 262144.
If not, please report as a bug.
cheers
alex
More information about the wxruby-users
mailing list