in reply to Re^5: how to set tab order in the perl tk?
in thread how to set tab order in the perl tk?

Actually, packforget is used to make that table invisible, when that button is pressed again. It means at the first press of button table will appear and in the next press of button table will disappear. Well I cannot comment out my size restrictions, because the moment i do that whole window become so small (of course with scroll), but it does not serve my purpose. I want my first table and following buttons to be shown by default, and when "new names" button is pressed a table should appear with a scrollbar (in main window) having default focus. I think this will make the things clearer.
  • Comment on Re^6: how to set tab order in the perl tk?

Replies are listed 'Best First'.
Re^7: how to set tab order in the perl tk?
by zentara (Cardinal) on Dec 25, 2008 at 12:33 UTC
    Well, I'm not sure this is the best solution, but it works. You can't have the -expand=>1 -fill=>'both' on the $spane, it interferes with the scrollbar calculations. And you need to set a height for the Pane. There probably is a way to calculate the needed height, but I just hard coded in 400 pixels.
    my $spane = $mw->Scrolled('Pane', -scrollbars => 'oe', -height => 400, -bg => "orange", )->pack(); my $yscrollbar = $spane->Subwidget('yscrollbar'); $yscrollbar->focus; #makes up/down arrows control scrollbar

    I'm not really a human, but I play one on earth Remember How Lucky You Are