On Thu, Dec 07, 2000 at 10:09:22AM -0700, Shane Spencer wrote:

(Please remember to include the list's address in the reply;
unfortunately, the PyGTK list doesn't set Reply-To: to itself,
so you must do this manually when you reply to posts. No,
James isn't going to change this)

> > These positions are always relative to the parent window. Tk has
> > extra attributes called root_x and root_y which return the position
> > relative to the root window (which is usually filling the whole screen).
> > 
> > But I guess the better question is: What are you trying to achieve ?
> > Usually, you don't need to care about the position of the widget.
> > 
> > > So can anybody tell me how to get parent widget ID's?  If so a recursive
> > > function will be able to tell me what the X,Y position of the Widget is
> > > in relation to the Main Window.. :)
> > 
> > I've written a patch for PyGTK which gives every widget the
> > attribute "parent" but that has been payed by a customer and
> > I'm not yet allowed to give that away :-( It's a small patch
> > and something very valuable (for example, it allows to add
> > tooltips to the columns of a CTree/CList !).
> > 
> 
> Hehe.. I need to go agains widget philosophy..   you see I am making a
> touchscreen application and the client has suggested that whenover the
> finger is over a button.. a larger button appears popup style over it
> and then disapears as soon as the mouse leaves it..   that is why I need
> to know the x, y of the root window..  I have however just realized to
> myself that "after" you show the main window/widget and everything is
> allocated.. then get_allocation dows work relative to the windows
> top-left corner.. all I need now is an X,Y for the window on the screen
> and I am in business..

Well, it makes sense for applications with limited amount of screen
space (PDAs, etc) but usually, it annoys the user when he cannot
select any font size because it breaks the app.

> Also I am a fixed position programmer by default.. so I am getting used
> to widgets.. however most of my programs really break the widget
> philosphy with some new techniques.. so it is a little odd always
> reading that I should not care about where the widgets are .. can
> anybody explain that too me?  Is there a deep dark widget cult that I am
> offending by always going above and beyond Widgetry?

The idea is this: If you have bad vision, then you want to be able to
use a very large font and contrast-rich colors. You don't want the app
designer to be "smarter" than you and fixing these things and thus
making the app useless for you.

Also, doing a good layout is something most software developers can't
do. Therefore, it makes sense to revoke the power to fixate these things
from the app developer and pass it to the app user. Ultimately, what
the user wants is a GUI which he can design (so it fits his needs 
best). This way, the app developer just provides the functionality
and the user desides how it should look like. Think of Themes and
Skins.

Actually, when you get used to it, it's a great relief since you
can concentrate on software design instead of GUI design (which
you will ultimately always get wrong for someone :-)

-- 
==============================================
Sowatec AG,       CH-8330 Pfäffikon (ZH)
Witzbergstr. 7,   http://www.sowatec.com
Tel: +41-(0)1-952 55 55
Fax: +41-(0)1-952 55 66
----------------------------------------------
Aaron "Optimizer" Digulla, [EMAIL PROTECTED]
==============================================

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to