Forum: wxRuby change widget focus with enter instead of tab

Posted by hendra kusuma (Guest)
on 2010-09-17 09:55
(Received via mailing list)
Dear all,

is there a way to change widget focus with enter key instead of tab

Regards
Hendra
Posted by Fabio Petrucci (biospank)
on 2010-09-17 11:38
(Received via mailing list)
Set style to text filed that should receive enter event:

text_fied_1.toggle_window_style(Wx::TE_PROCESS_ENTER)

into the panel that contain text_field_1

evt_text_enter(text_field_a) { |evt| text_field_2.set_focus()}

hope this help.

regards,

bio.
Posted by hendra kusuma (Guest)
on 2010-09-18 03:54
(Received via mailing list)
very helpful
thank you
Posted by Chloro Form (tony44)
on 2010-09-19 19:21
Fabio Petrucci wrote:
> Set style to text filed that should receive enter event:
> 
> text_fied_1.toggle_window_style(Wx::TE_PROCESS_ENTER)
> into the panel that contain text_field_1
> evt_text_enter(text_field_a) { |evt| text_field_2.set_focus()}
> 
> hope this help.
> 
> regards,
> 
> bio.

is this possible for grid cell editors, too?

Thanks,
Tony
Posted by Fabio Petrucci (biospank)
on 2010-09-20 09:30
(Received via mailing list)
On Sun, Sep 19, 2010 at 7:21 PM, Tony Meier <lists@ruby-forum.com> 
wrote:

> >
> > bio.
>
> is this possible for grid cell editors, too?
>
> Thanks,
> Tony
> --
>

I don't really know...

You think should check for something like 'activate' event and then, if 
you
can localize cell grid objects and they respond to 'set_focus', it 
should
work.

Let us know.

Good luck.

bio.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.