Advertisement

01.31.2006 at 11:46AM PST, ID: 21717479
[x]
Attachment Details

A little perl tk question

Asked by dopyiii in Perl Programming Language

Tags: perl, tk, popup, menu

I'm trying to make a menu that pops up automatically on "mouse over" and closes on "mouse leave" (quotes for lack of a better term).  Not only that, I want focus to return to the main window, like it was before I entered the widget.  Make sense?

I've been able to use a popup menu on a label to simulate this effect by binding a $menu->Popup(... call to the <Motion> and <Enter> events (I'm using <Enter> right now, but I started with <Motion>).  However, I can't get the darn thing to lose focus and close when I move the mouse off of either the popup menu or the label.

I suppose that I could right a generic callback function that checks for which widget I'm current only, try to close all menus, restore focus, etc., but that seems like overkill.  What am I missing?

Thanks!
Start Free Trial
[+][-]01.31.2006 at 12:50PM PST, ID: 15837510

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.31.2006 at 12:59PM PST, ID: 15837610

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.08.2006 at 02:16PM PST, ID: 16139213

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]03.12.2006 at 01:09AM PST, ID: 16166339

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Perl Programming Language
Tags: perl, tk, popup, menu
Sign Up Now!
Solution Provided By: modulo
Participating Experts: 2
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32