my $m = $config{BuddyList}->Menu(-tearoff => 0); $m->add( 'command', -label => "Unterhaltung starten", -state => $stat == 0 ? 'disabled' : 'normal', -command => sub { StartChat($user) } ); $config{"ItemFrame_".$user}->bind('' => sub { $m->Popup( -popover => 'cursor') });