[Tutor] disabling Pmw ComboBox's EntryField? [quick lambda hacks]
Lance E Sloan
Tue, 19 Feb 2002 09:11:11 -0500
Danny Yoo wrote:
> By the way, we don't really need lambda; I was using a shortcut. We could
> alternatively do something like this:
Oh, sure. That makes sense. But I really like using the lambdas
instead. That way I don't have to define a callback function for each
of the 3-4 ComboBoxes that are part of my class. I don't need to think
up silly names that will just clutter up the namespace.
Actually, I started to write a callback function for my ComboBoxes. I
tried to make it general enough that I could use it as the same
callback for each of the ComboBoxes I made. I thought that I could get
a reference to the widget in question from the event that was passed
in. However, I found that the event widget was the text entry field,
not the ComboBox. When I looked to its master, I found that it, and
all of its ancestors were Frame widgets. None were the ComboBox. So,
I guess Pmw methods return references to Pmw objects, but if I work
backwards from part of a Pmw widget, I will only find the Tkinter
> > Is there a mailing list somewhere that's dedicated to Python Tkinter
> > programming?
> Dunno about this, but Tutor is a pretty good place to ask Tkinter
> questions. I believe that Manning, publishers of "Python and Tkinter
> Programming", hosts a forum for people who have bought the book:
I'll have a look there. I asked because I've been reading Tutor for
more than a year now and I haven't noticed a lot of Tkinter
discussion. Maybe if I search the archives, I'll find there's more
than I thought. When I asked my question and I didn't see a lot of
responses quickly, I wondered if I were asking in the wrong forum.
Maybe I'm just an instant gratification junkie. :)
Lance E Sloan
Web Services, Univ. of Michigan: Full-service Web and database design,
development, and hosting. Specializing in Python & Perl CGIs.
http://websvcs.itd.umich.edu/ - "Putting U on the Web"