I have a very simple GUI which interacts with postgresql database. The mainframe is split into 4 quadrants with each quadrant having 4 Entry Widgets. Here is an example code of one quadrant
my $f_blue = $bottom_half->Frame(-bg=>'BLUE')-> pack(-side=>'left', -expand=>1, -fill=>'both');
$f_blue->Label(-text=>'BLUE', -bg=>'blue', -fg=>'white')->pack(-side=>'top');
my $blue_table = $f_blue->Table(-rows => 3,
-columns => 3,
-fixedrows => 1,
-fixedcolumns => 1,
-scrollbars => 'oo',
-relief => 'raised') -> pack(-side => 'top', -expand => 1, -fill=>'both');
$blue_table -> put(1,1,
$blue_table->Label(-text => 'Cs-137:'));
my $t_blue_cs137 = $blue_table->Entry(-selectbackground=>"blueviolet");
$blue_table -> put(1,2,$t_blue_cs137);
$blue_table -> put(1,3,
$blue_table->Label(-text => 'MBq'));
$blue_table -> put(2,1,
$blue_table->Label(-text => 'Tc-99m:'));
my $t_blue_tc99m = $blue_table->Entry(-selectbackground=>"blueviolet");
$blue_table -> put(2,2,$t_blue_tc99m);
$blue_table -> put(2,3,
$blue_table->Label(-text => 'MBq:'));
$blue_table -> put(3,1,
$blue_table->Label(-text => 'Tl-201:'));
my $t_blue_tl201 = $blue_table->Entry(-selectbackground=>"blueviolet");
$blue_table -> put(3,2,$t_blue_tl201);
$blue_table -> put(3,3,
$blue_table->Label(-text => 'MBq:'));
When entering data using the GUI I am unable to tab to skip to the next entry. Is there a way of setting key bindings so I can loop to set
`$t_blue_cs137` to be active
PRESS TAB
`$t_blue_tc99m` NOW ACTIVE
PRESS TAB
`$t_blue_tl201` NOW ACTIVE
PRESS TAB
Do the same with the next quadrant
`$t_red_cs137` in frame $f_red NOW ACTIVE
Is there a way to do this in perlTK
I have tried the following
$f_blue->bindtags( [ ($f_blue->bindtags)[$t_blue_cs137,$t_blue_tc99m,$t_blue_tl201] ] );
# fix the bindtags order so that widget events are
# processed before class events
$f_blue->bind("<Tab>", sub { $f_blue->focusNext; Tk->break; });
However, this only lets me tab between each subframe and the buttons in the GUI