ldln has asked for the wisdom of the Perl Monks concerning the following question:
Sample code:
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 displ +ayed.. #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(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Is Tk::Text-widget PopUp-menu onscreen?
by zentara (Cardinal) on Aug 14, 2005 at 13:20 UTC | |
by ldln (Pilgrim) on Aug 14, 2005 at 14:05 UTC | |
|
Re: Is Tk::Text-widget PopUp-menu onscreen?
by zentara (Cardinal) on Aug 14, 2005 at 11:54 UTC |