gnumed-devel
[Top][All Lists]
Advanced

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

[Gnumed-devel] Tool Tips for Tab Images (?) (Patient - TabbedList)


From: Michael Bonert
Subject: [Gnumed-devel] Tool Tips for Tab Images (?) (Patient - TabbedList)
Date: Thu, 20 Feb 2003 02:25:13 -0500 (EST)

I've been trying to get tool tips attached to the images on the tabbed
list (gmGP_TabbedList.py) in the 'patient' section.

If you follow the wxpython-users mailing-list you've probably seen this
post:
http://lists.wxwindows.org/cgi-bin/ezmlm-cgi?11:mss:16218:200302:bcpikopnobfkkmmdibkd

It explains some of the approaches I've taken to the problem and why 
I'm not using wxToolTip (what at first glance should be the solution).

If you look at the code/give it a try you'll see I'm part way there; most
tabs when moused-over generate a tooltip.

Problems are...
(1) I want to make the tooltip appear below the tab (regardless from which
direction the mouse moves over the tab----and similar to wxToolTip in this
respect)
(2) I want the tooltip to disappear when the mouse is no longer over the
tab (currently it hangs around until you click the mouse or press a key on
the keyboard).

I thought I was close to accomplishing (2); the wxTipWindow class has a
method (SetBoundingRect) where one can set a created tool tip to self
destruct on the mouse pointer moving outside of a defined rectangle.  The
problem I've had with this is that the defined rectangle seems to be in
screen coordinates (1,1=upper left hand corner of screen--confirmed with
some test code) and not related to the wxPanel it is a child of, or the
wxNotebook it is defined in.

I know it is possible to move the tool tip window:
a_wxTipWindow.Move(new_x_position, new_y_position)

If I could get the (screen) coordinates of the wxNotebook I could make
(2) work and with some experimentation figure out the distances to
implement (1).  Thing is, I'm not aware of a method to find the top level
window where "GetPosition" (a wxWindow class method) returns the screen
coordinates.  Then, even if this does work, the whole approach seems to be
quite a mess--I read somewhere doing window layout with coordinate data
generally isn't a good idea. 

I feel like I've programmed myself into a corner.

Help would be much appreciated...
Michael





reply via email to

[Prev in Thread] Current Thread [Next in Thread]