Sorry, I don''t really understand your question,
but if I got it right,
you expect that if you press tab key, then focus will move to next control
to do so automatically, you simply have to put every control
in a panel. I am personally doing it in this order :
frame -> panel -> sizer -> control
Hope this help
On Sun, Mar 21, 2010 at 6:57 AM, Philip <plusgforce at gmail.com> wrote:
> Below is my attempt at changing the focus from one text control to the
> next control after a person presses the tab key. The wxTE_PROCESS_TAB
> style property has been selected for each of the controls. What
> corrections do I have to make? Thanks.
>
> #!/usr/bin/env ruby
> require ''rubygems''
> require ''wx''
> require ''tp1.rb''
>
> class MainFrame < TPSC
> def on_init
> m_scrolledwindow6.set_virtual_size(400, 100)
> m_scrolledwindow6.set_scroll_rate(5, 5)
>
> wxEVT_CHAR(@m_textCtrl2) { m_textCtrl3.set_focus }
> wxEVT_CHAR(@m_textCtrl3) { m_textCtrl4.set_focus }
> wxEVT_CHAR(@m_textCtrl4) { m_textCtrl4.set_focus }
>
> # evt_button(@m_buttonincrement) { increaseColour }
> # evt_button(@m_buttondecrement) { decreaseColour }
> end
>
>
> Wx::App.run do
> self.app_name = ''TestNotebook''
> frame = MainFrame.new
> frame.show
> end
>
>
> _______________________________________________
> wxruby-users mailing list
> wxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wxruby-users
>
--
Suka linux?
Kunjungi blog saya http://penguinroad.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/wxruby-users/attachments/20100322/8c8a74b5/attachment.html>