Re: Popup menu for Gtk2::Entry

zentara <zzmiloschxx gmail com> writes:

$label->signal_connect (populate_popup => sub {
      my (undef, $menu) = @_;
      my $item = Gtk2::MenuItem->new ('Whee');
      $menu->append ($item);

Yep.  For one of mine I put a new entry at the start instead of the end.
Depends how important it might be relative to the basic items.
A separator item is good to delimit new bits.


:-) Beyond the event handling, the key in that particular bit of
nonsense is a menu which tracks the rows of a ListStore or TreeStore.
I made it for a popup of "history" items to go back to, but anything
with a dynamic set of choices could work.

The sigfile mis-named food series: Hawaiian Pizza
A type of pizza with pineapple.  Unknown in Hawaii and
certainly beneath the dignity of any Italian.  Some say it
was the over-fertile imagination of an Australian pub chef.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]