dimmesdale has asked for the wisdom of the Perl Monks concerning the following question:
I get the latter one just by including an $notebook->add('something', options) statement (which the docs say is how you get a tab).
Here's the relavent portion, thanks for any help ...
my $nb = $mw->NoteBook->grid; for(0..$num-1) { my $page = $nb->add("Page$_", -text => "Name$_"); my $ne = $page->Entry( -textvariable => \$info->[$_]->{name}, ); my $ie = $page->Entry( -textvariable => \$info->[$_]->{index}, ); my $pom = $page->Optionmenu( -variable => \$info->[$_]->{parser}, -options => [@parsers], ); my $gom = $page->Optionmenu( -variable => \$info->[$_]->{graph}, -options => [@graphs], ); my $rcb = $page->Checkbutton( -text => 'Rare Event', -variable => \$info->[$_]->{rareevent}, ); my $dom = $page->Optionmenu( -variable => \$info->[$_]->{subdir}, -options => [@subdirs], ); my $fom = $page->Optionmenu( -variable => \$info->[$_]->{file}, -options => get_files($info->[$_]->{subdir}), ); my $b = $page->Button( -text => 'Set', -command => [\&record, {}], ); my @grid = (); if($name) { push @grid, \$ne} if($index) { push @grid, \$ie} if($parser) { push @grid, \$pom} if($graph) { push @grid, \$gom} if($rareevent) { push @grid, \$rcb} push @grid, (\$dom, \$fom, \$b); my $first = shift @grid; my $args = join(',', @grid); $$first->grid( eval $args );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tk::Notebook 'unkown tab'
by Abigail-II (Bishop) on Jul 22, 2002 at 14:09 UTC | |
by dimmesdale (Friar) on Jul 22, 2002 at 14:27 UTC |