Subject: | Tk:NoteBook incorrect intial layout |
This demo shows a wrong initial layout.
The button is not contained in its frame.
After raising tab 'A' the layout is correct;
This is under StrawberyPerl 5.26.2 on Windows 7.
Tk_Version 804.034
=========================================
use strict;
use warnings;
use Tk;
use TK::NoteBook;
my $mw = new MainWindow;
my $nb = $mw->NoteBook()->pack('-expand' => 1, '-fill' => 'both');
my $ta = $nb->add('A', -label => 'A')->pack('-expand' => 1);
my $tb = $nb->add('B', -label => 'B')->pack('-expand' => 1);
my $zf = $ta->Frame()->pack('-side' => 'top', '-anchor' => 'n', '-expand' => 0, '-fill' => 'x');
my $bz1 = $zf->Button('-text' => '+')->pack('-side' => 'left', '-anchor' => 'n', '-expand' => 1, '-fill' => 'x');
$nb->raise('B'); # results in wrong layout
$mw->update;
$mw->after(3000);
$nb->raise('A'); # raise 'A' corrects it
MainLoop;