AcceleratorTable to "tab" the formular & trapping signals from frame border buttons

Hi all,

I have two problems and I would be very happy if we could solve them.
Thanks in advance.

my first problem:
I want to realise a formular for user input that is able to switch the
activated TextCtrl (there are a few) by clicking “TAB”. It is quiet easy
to trap the Tab click but I have no idea how to handle the “activation”
of the next TextCtrl.

Maybe the solution is simple but I don’t see it?! ;(
Code so far:

acc_table = Wx::AcceleratorTable[
  [ Wx::ACCEL_NORMAL,   Wx::K_TAB, 8001 ] ]
self.accelerator_table = acc_table
evt_menu(8001) { puts "what to do?" }

my second problem:
how do I trap a signal from the window border icons - I don’t know how
it is called, I mean “minimize”, “maximize” and “exit” buttons in the
upper right corner?

If you want to see the whole project:
http://labdiary.sourceforge.net/

Help is always welcome.
Thank you very much!

Kind regards,
der Max

Hello Maximilian,

2009/10/12 Maximilian Bräutigam [email protected]

Maybe the solution is simple but I don’t see it?! ;(
Code so far:

acc_table = Wx::AcceleratorTable[
[ Wx::ACCEL_NORMAL, Wx::K_TAB, 8001 ] ]
self.accelerator_table = acc_table
evt_menu(8001) { puts “what to do?” }

There’s a simpler method, but it depends on if your using Multi-Line
TextCtrl’s, or Single Line TextCtrl’s. Please let me know what you are
doing so I can guide you further from this point.

my second problem:
how do I trap a signal from the window border icons - I don’t know how
it is called, I mean “minimize”, “maximize” and “exit” buttons in the
upper right corner?

For these specific events, take a look at the following:

CloseEvent - http://wxruby.rubyforge.org/doc/closeevent.html
IconizeEvent - http://wxruby.rubyforge.org/doc/iconizeevent.html
SizeEvent - http://wxruby.rubyforge.org/doc/sizeevent.html

CloseEvent is triggered when a Window is closed
IconizeEvent is triggered when a Window is minimized/restored
SizeEvent is triggered when a Window is Maximized/restored


wxruby-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wxruby-users

hth,
Mario

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs