Eric Brunel eric.brunel at
Wed Dec 10 19:10:10 CET 2003

mark wrote:
> 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 widget
> conditionally.  At any rate:
> Nochoice = Pmw.ComboBox()
> Nochoice._entryWidget['state'] = DISABLED

You shouldn't do that: as indicated by the leading underscore, _entryWidget is 
an internal field and shouldn't be accessed directly. So upgrading your Pmw 
version may someday break your code. The portable way to do what you want is:



NoChoice['entry_state'] = DISABLED

if you prefer this syntax.

> Now, this is effectively disabling the entire widget, since it won't put
> 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: at
> [ at] On Behalf
> Of Gombos Katalin
> Sent: Wednesday, December 10, 2003 8:14 AM
> To: python-list at
> Subject: Pmw.ComboBox
> Hi,
> How could I make the ComboBox state disabled?
> I don't want to let anybody to scroll the listbox of the ComboBox.
> Thank You!
> Katux

- Eric Brunel <eric dot brunel at pragmadev dot com> -
PragmaDev : Real Time Software Development Tools -

More information about the Python-list mailing list