mark at diversiform.com
Wed Dec 10 19:42:38 CET 2003
Excellent! See, always something to learn around here.
From: python-list-bounces+mark=diversiform.com at python.org
[mailto:python-list-bounces+mark=diversiform.com at python.org] On Behalf
Of Eric Brunel
Sent: Wednesday, December 10, 2003 10:10 AM
To: python-list at python.org
Subject: Re: Pmw.ComboBox
> I guess I would wonder why you'd use a ComboBox that you didn't want
> someone to select anything from, but maybe you are disabling the
> conditionally. At any rate:
> Nochoice = Pmw.ComboBox()
> Nochoice._entryWidget['state'] = DISABLED
You shouldn't do that: as indicated by the leading underscore,
an internal field and shouldn't be accessed directly. So upgrading your
version may someday break your code. The portable way to do what you
NoChoice['entry_state'] = DISABLED
if you prefer this syntax.
> Now, this is effectively disabling the entire widget, since it won't
> anything in the entry box. I'm not certain if this is what you're
> looking for, but it works for me.
> - Mark
> -----Original Message-----
> From: python-list-bounces+mark=diversiform.com at python.org
> [mailto:python-list-bounces+mark=diversiform.com at python.org] On Behalf
> Of Gombos Katalin
> Sent: Wednesday, December 10, 2003 8:14 AM
> To: python-list at python.org
> Subject: Pmw.ComboBox
> How could I make the ComboBox state disabled?
> I don't want to let anybody to scroll the listbox of the ComboBox.
> Thank You!
- Eric Brunel <eric dot brunel at pragmadev dot com> -
PragmaDev : Real Time Software Development Tools -
More information about the Python-list