Die Listboxen II

 [Vorheriges Kapitel]  [Vorherige Seite]  [Inhaltsverzeichnis]  [Nächste Seite]  [Nächstes Kapitel]

runplex.pl
sub create_listbox {
   my ($frame, $title, @entries) = @_;

   my $inner_frame = $frame->Frame();
   my $label = $inner_frame->Label(
      '-text' => $title,
      '-width' => $listbox_width,
   );
   $label->pack('-side' => 'top', @fillx);
   my $listbox = $inner_frame->Listbox(
      '-width' => $listbox_width,
      '-height' => $listbox_height,
   );
   $listbox->insert('end', @entries);
   $listbox->pack('-side' => 'top', @expandx);
   return ($inner_frame, $listbox);
}

*$listbox_width und $listbox_height wurden entsprechend der vorgegebenen Angaben festgelegt. Das erspart etwaige Scrollbars.
 

 [Vorheriges Kapitel]  [Vorherige Seite]  [Inhaltsverzeichnis]  [Nächste Seite]  [Nächstes Kapitel]
Copyright © 1996 - 2003 Andreas Borchert, in HTML konvertiert am 01.10.2003