Valued confreres,
I'm looking for a way to provide extra information on entries in a Tk::BrowseEntry. I use -listcmd because in the application I'll be adding dynamically to the dropdown list. First try:
my @choices = qw/1 2 3/; my @help = qw/one two three/; my $top = MainWindow->new (); my $tag = $top->Balloon (-state => 'balloon'); my $entry = $top->BrowseEntry (%BE_args); $entry->configure ( -listcmd => sub { my $lb = $entry->Subwidget ('slistbox') ->Subwidget ('listbox' ); $entry->configure (-choices => \@choices); $tag->attach ($lb, -balloonmsg => \@help); } );
No luck. I thought that this could be caused by the listbox not being visible yet when listcmd() fires, so I tried:
my @choices = qw/1 2 3/; my @help = qw/one two three/; my $top = MainWindow->new (); my $tag = $top->Balloon (-state => 'balloon'); my $entry = $top->BrowseEntry (%BE_args); $entry->configure ( -listcmd => sub { $entry->configure (-choices => \@choices); } ); my $lb = $entry->Subwidget ('slistbox') ->Subwidget ('listbox' ); $lb->bind ( '<Visibility>' , sub { $tag->attach ( $lb , -balloonmsg => \@help ); } );
Again no luck. I've tried using the 'slistbox' subwidget itself, without success either. And I've verified that the Visibility callback actually triggers.
Is this even possible? If so, how?
In reply to Tk::BrowseEntry with Tk::Balloon help by redlemon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |