Thread BrowseEntry (dropdown) Indexes heraus bekommen (7 answers)
Opened by Krikus at 2007-12-03 20:25

styx-cc
 2007-12-03 20:59
#103408 #103408
User since
2006-05-20
533 Artikel
BenutzerIn

user image
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl -w 
use strict;
use Tk;
use Tk::BrowseEntry;

my $mw = tkinit();
my $frame = $mw->Frame->pack;

$b = $frame->BrowseEntry(-label => "Label", -browse2cmd => \&show_index);
$b->insert("end", "opt1");
$b->insert("end", "opt2");
$b->insert("end", "opt3");
$b->pack;
MainLoop;

sub show_index {
  my $self = shift;
  print shift;
}


Steht aber auch in der Dokumentation.

Edit:
$b aber sonst bitte nicht so verwenden
Pörl.

View full thread BrowseEntry (dropdown) Indexes heraus bekommen