Re: controlling the focus order.
- From: Neil Dugan <debain_programer butterflystitches com au>
- To: gtk-perl-list gnome org
- Cc: Torsten Schoenfeld <kaffeetisch gmx de>
- Subject: Re: controlling the focus order.
- Date: Thu, 28 Sep 2006 10:12:14 +1000
Neil Dugan wrote:
Thanks for the quick reply.
Torsten Schoenfeld wrote:
On Tue, 2006-09-26 at 22:50 +1000, Neil Dugan wrote:
I found the Gtk2::Controller->set_focus_order() function, but I was
unable to find anything on how to use it.
I suppose you mean Gtk2::Container->set_focus_chain() here. To use it,
just supply an ordered list of widgets that should be in the chain:
yes, typo sorry.
@chain = ($widget1, $widget2, ...);
$container->set_focus_chain (@chain);
Or, of course:
$container->set_focus_chain ($widget1, $widget2, ...);
I tried using set_focus_chain() on the window object that didn't
affect anything, I then tried using set_focus_chain() on the first
Vbox that is packed into the window, that did do something. When the
<tab> key it hit the entry widget that is first emits a
'focus-out-event' signal, then the focus returns to the first widget,
it doesn't move to the second widget in the chain.
Regards Neil.
I found out what I needed to do. :)
As my layout was done with several nested HBox and VBox containers I
needed to use the set_focus_chain function in several places. As each
set_focus_chain affects only the widgets added to it (and not those
further down the tree of widgets).
Again thanks for the answers.
Regards Neil.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]