use strict; use Tk; my $mw = MainWindow->new(); my $Text = $mw->Text()->pack; my $TextMenu = $Text->menu(); my $timer = $mw->repeat(100,\&Loop); MainLoop; sub Loop { #Try various ways to detect if PopUp-menu of Tk::Text is displayed.. #Dont't work (no change when popup is displayed) my $IsMenuMapped = $TextMenu->ismapped(); #Dont't work (no change when popup is displayed) my $IsMenuViewable = $TextMenu->viewable(); #Dont't work (no change when popup is displayed) my $WhoGotFocus = $mw->focusCurrent(); #Dont't work (no change when popup is displayed) my $MenuRootY = $TextMenu->y; #Dont't work (no change when popup is displayed) my $MenuHeight = $TextMenu->height(); }