This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Tix ComboBox entry is blank when not editable
Type: behavior Stage: test needed
Components: Tkinter Versions: Python 3.0, Python 2.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: loewis Nosy List: ajaksu2, gpolo, loewis, mkiever, twegener
Priority: normal Keywords:

Created on 2006-11-21 05:27 by twegener, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (7)
msg61038 - (view) Author: Tim Wegener (twegener) Date: 2006-11-21 05:27
When setting editable=False for Tix.ComboBox, when selecting an item from the combo box, the selected item should appear in the entry field. In Windows this does not happen, and the entry field is dark grey and blank. 

When editable=True the label is visible.

Problem occurs in:
Python 2.3.5 (Windows)
Python 2.4.4 (Windows)
(the above appear to use tk 8.4)

Works fine in:
Python 2.2.2 (Red Hat 9)
Python 2.3.5 (Red Hat 9)
Python 2.4.1 (Red Hat 9)
Python 2.5 (Red Hat 9)
(all of the above with tk 8.3.5, tix 8.1.4)
msg61039 - (view) Author: Tim Wegener (twegener) Date: 2006-11-21 05:43
The following workaround does the job:

entry = combobox.subwidget_list['entry']
entry.config(state='readonly')

It appears that when doing ComboBox(editable=False) the Entry widget is being set to DISABLED rather than 'readonly'. 
msg61040 - (view) Author: Matthias Kievernagel (mkiever) * Date: 2007-01-19 19:48
Or it might just be a problem with default colours.
On my Linux box the selected item is hard to read.
The shades of grey are very similar.
Try changing the colours
(disabledforeground/disabledbackground/readonlybackground).

This is most probably no Python bug, as options
are sent to the Tcl-Interpreter mostly without any change
or magic.

Greetings,
Matthias Kievernagel
msg61041 - (view) Author: Matthias Kievernagel (mkiever) * Date: 2007-01-19 19:55
Or it might just be a problem with default colours.
On my Linux box the selected item is hard to read.
The shades of grey are very similar.
Try changing the colours
(disabledforeground/disabledbackground/readonlybackground).

This is most probably no Python bug, as options
are sent to the Tcl-Interpreter mostly without any change
or magic.

Greetings,
Matthias Kievernagel
msg84586 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-03-30 17:24
Tim: do you agree with the default colors explanation?
msg85451 - (view) Author: Tim Wegener (twegener) Date: 2009-04-05 00:05
I encountered this bug at my previous place of employment. I've since
moved on, so I don't have access to the code/setup where this originally
occurred. 

I tried to setup a test case to reproduce this, but was thwarted by
another bug, probably related to my Linux distro (Fedora 10):

$ python issue_1600182.py 
Traceback (most recent call last):
  File "issue_1600182.py", line 10, in <module>
    c = Tix.ComboBox()
  File "/usr/lib/python2.5/lib-tk/Tix.py", line 579, in __init__
    cnf, kw)
  File "/usr/lib/python2.5/lib-tk/Tix.py", line 307, in __init__
    self.tk.call(widgetName, self._w, *extra)
_tkinter.TclError: invalid command name "tixComboBox"

I can't comment further until I resolve this other problem.
msg89578 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2009-06-21 19:37
I don't have access to this file "issue_1600182.py" but it seems you are
forgetting to instantiate Tix.Tk (which will load the 'tix' package)
before creating the Tix.ComboBox.

I'm closing this as it is not a bug in the python tix wrapper, and I
believe the tix package has been fixed since I just tested it on Windows
and I didn't see the bug.
History
Date User Action Args
2022-04-11 14:56:21adminsetgithub: 44261
2009-06-21 19:37:38gpolosetstatus: open -> closed
resolution: not a bug
messages: + msg89578
2009-04-05 00:05:33twegenersetmessages: + msg85451
2009-03-30 17:24:55ajaksu2setversions: + Python 2.6, Python 3.0
nosy: + ajaksu2, gpolo

messages: + msg84586

type: behavior
stage: test needed
2006-11-21 05:27:14twegenercreate