Note that there are some explanatory texts on larger screens.

plurals
  1. POPerl tk - tab between entry widgets
    primarykey
    data
    text
    <p>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</p> <pre><code>my $f_blue = $bottom_half-&gt;Frame(-bg=&gt;'BLUE')-&gt; pack(-side=&gt;'left', -expand=&gt;1, -fill=&gt;'both'); $f_blue-&gt;Label(-text=&gt;'BLUE', -bg=&gt;'blue', -fg=&gt;'white')-&gt;pack(-side=&gt;'top'); my $blue_table = $f_blue-&gt;Table(-rows =&gt; 3, -columns =&gt; 3, -fixedrows =&gt; 1, -fixedcolumns =&gt; 1, -scrollbars =&gt; 'oo', -relief =&gt; 'raised') -&gt; pack(-side =&gt; 'top', -expand =&gt; 1, -fill=&gt;'both'); $blue_table -&gt; put(1,1, $blue_table-&gt;Label(-text =&gt; 'Cs-137:')); my $t_blue_cs137 = $blue_table-&gt;Entry(-selectbackground=&gt;"blueviolet"); $blue_table -&gt; put(1,2,$t_blue_cs137); $blue_table -&gt; put(1,3, $blue_table-&gt;Label(-text =&gt; 'MBq')); $blue_table -&gt; put(2,1, $blue_table-&gt;Label(-text =&gt; 'Tc-99m:')); my $t_blue_tc99m = $blue_table-&gt;Entry(-selectbackground=&gt;"blueviolet"); $blue_table -&gt; put(2,2,$t_blue_tc99m); $blue_table -&gt; put(2,3, $blue_table-&gt;Label(-text =&gt; 'MBq:')); $blue_table -&gt; put(3,1, $blue_table-&gt;Label(-text =&gt; 'Tl-201:')); my $t_blue_tl201 = $blue_table-&gt;Entry(-selectbackground=&gt;"blueviolet"); $blue_table -&gt; put(3,2,$t_blue_tl201); $blue_table -&gt; put(3,3, $blue_table-&gt;Label(-text =&gt; 'MBq:')); </code></pre> <p>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 </p> <pre><code>`$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 </code></pre> <p>Is there a way to do this in perlTK</p> <p>I have tried the following </p> <pre><code>$f_blue-&gt;bindtags( [ ($f_blue-&gt;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-&gt;bind("&lt;Tab&gt;", sub { $f_blue-&gt;focusNext; Tk-&gt;break; }); </code></pre> <p>However, this only lets me tab between each subframe and the buttons in the GUI</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload