[wxruby-users] StyledTextCtrl not receiving all entered keys
Alex Fenton
alex at pressure.to
Tue Dec 16 07:24:04 EST 2008
Robin Rogge wrote:
> Thanks for your response. I actually never saw this demo before and it
> works perfectly. So, looking at it, i see the main difference between my
> code and the demo code is that i use an extended StyledTextCtrl, while
> the demo uses a direct instance of StyledTextCtrl. For testing, i
> trimmed my extended class as far as possible until the following code
> remained, while the problem still remained:
>
> class EditorPage < Wx::StyledTextCtrl
> end
>
> So the demo uses
>
> @sci = Wx::StyledTextControl.new(self)
>
> while i use
>
> @sci = EditorPage.new(self)
I don't believe there is a problem with subclasses of StyledTextCtrl. If
you put your subclass in the wxRuby demo it still works fine, and I've
used complex subclasses of STC in real code without difficulty.
So there is something else wrong in your program. Happy to try out a
minimal runnable sample that demonstrates the issue - you may find that
selectively removing elements from the frame may identify the source of
the difficulty. My guess would be that some other widget (eg a Frame) or
the App is being told to trap and not pass them on.
alex
More information about the wxruby-users
mailing list