Aaron Optimizer Digulla wrote:
> 
> On Thu, Dec 07, 2000 at 10:09:22AM -0700, Shane Spencer wrote:
> > > 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 :-)
> 

hehe..  this is for a Point of Sale application which has 800, 600
screen and space is an issue and flexibility in font size is not an
issue..  really just being able to make an impressive app is what I am
after and the themability of gtk helps out a lot..   I basically have
the issue covered now so no problem's  however just as it is a good
concept for making things more usable for the user.. it is probably not
more usable straight out of the box for the client.. because NOTHING is
ever good enough for the client..

Have a Merry Xmas Guys!

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

Reply via email to