[pygtk] Help: How to determine if a widget is "viewable"

David Hirschfield davidh at ilm.com
Tue Sep 12 09:07:50 WST 2006


I want to make sure I explain this properly, because there's a limited 
vocabulary to use and the available words describe multiple possible 
situations.

I'm looking for the simplest way to determine if a widget is "viewable" 
(which is not the same thing as "visible").
By "viewable" I mean that the user is actually able to see some or all 
of the widget's extent (the rectangle enclosing the widget on screen) 
when they are looking at the window the widget is in.

A button that is currently completely scrolled out of view in a 
scrolling window is not viewable.
A text box in a notebook tab pane that is not the frontmost tab pane is 
also not viewable.

This isn't really the same as whether a widget is "exposed" because if 
window "A" covers the window that the widget is in, window "B", and the 
widget was viewable in window "B", it would still be considered viewable.

This also isn't the same thing as the widget.visible value, since that 
will return True even if the widget is in a notebook page that isn't the 
front page.

Let me know if I'm not explaining this well, I've had trouble describing 
it to coworkers.
-David

-- 
Presenting:
mediocre nebula.



More information about the pygtk mailing list