Tkinter Questions
Grant Edwards
grante at visi.com
Sat Sep 29 17:11:52 EDT 2001
More information about the Python-list mailing list
Sat Sep 29 17:11:52 EDT 2001
- Previous message (by thread): Tkinter Questions
- Next message (by thread): Tkinter Questions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, 29 Sep 2001 21:39:44 +0200, Janos Blazi <jblazi at hotmail.com> wrote: >(1) It would be nice to have a big (or better long) button that >does different things depending on which side of the button has >been clicked, the left side or the right side. As this is >obviously not possible, Grashopper, It is not obviously possible, but that doesn't imply that it is obviously not possible. :) IOW, I think you can do that, but it's a bit complicated. You've got to assign a callback to the button-press event for that widget. That callback will be passed an event which contains the x,y corrdinates of the pointer. The callback would then query the widget for it's position and size. A bit of math occurs, and the callback does something different depending on which end of the button was clicked. I think that all of the info required to do such a thing can be gleaned from John Grayson's wonderful book _Python_and_Tkinter_ _Programming_ >(2) I have asked this questions already but received no answer. Unfortunately, I don't know enough about Pmw in general and that widget in particular to offer any suggestions. -- Grant Edwards grante Yow! .. I don't understand at the HUMOR of the THREE visi.com STOOGES!!
- Previous message (by thread): Tkinter Questions
- Next message (by thread): Tkinter Questions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list