Tk Library Source Code

View Ticket
Login
Ticket UUID: 519189
Title: Combobox bugs (and patch)
Type: Bug Version: None
Submitter: bach Created on: 2002-02-18 16:06:10
Subsystem: bwidget Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2002-10-15 03:01:08
Resolution: Fixed Closed By: hobbs
    Closed on: 2002-10-14 20:01:08
Description:
Hello,

the combobox has some small bugs I included a patch
for:

1. the selection is not cleared when the widget loses
the focus
    (resulting in weird colour display when explicitly
setting colours 
     other than the default)
2. the dropdown list does not honour the the colours
requested for      the entry widget (always displayed
in dark grey).

I have included a diff as well as the complete new
combobox source.

Regards,
          Bastien
User Comments: hobbs added on 2002-10-15 03:01:08:
Logged In: YES 
user_id=72656

fixed in 1.4.2.  I didn't add the one-line part1 fix because that 
breaks common behavior, and the ability to click into another 
widget, then later paste the selected combobox data there.

hobbs added on 2002-06-06 15:50:31:

File Deleted - 18052:

bach added on 2002-06-06 15:44:02:

File Added - 24499: combopatch.tar.gz

Logged In: YES 
user_id=98533

Changed the patch: now also reacts to configure changes 
while the listbox is shown

bach added on 2002-06-05 16:09:03:

File Added - 24426: patch_images.tar

Logged In: YES 
user_id=98533

Forgot to say: screenshots taken from a Sun display, I don't 
know wether the Windows standard colors for entry and 
listbox are grey, too.

bach added on 2002-06-05 16:02:26:
Logged In: YES 
user_id=98533

> This doesn't correctly handle the changing of -entrybg 
after the fact.

Ermm, I didn't get this one. 

> Also, is it really correct to tie the listbox background to 
the entry background?

I'd plead for the simplicity and behaviour according to the 
least surprise effect. We could introduce special colors for 
the listbox colors, but I think that this leads to GUIs that 
are not conforming to actual style guides.

I have attached a tar containing three screenshots of an 
actual application: 

- combocolors.gif shows the colors given to the entry of a 
combobox
- combonopatch.gif shows how the listbox is drawn 
without the patch. Note that it is in the standard grey color 
while the entry is still white, and the "select" colors are 
also not what one would expect. This is also an example of 
what could happen if we'd introduced special colors for 
the listbox.
- combopatch.gif shows the effect of the patch where the 
combobox behaves like people know it from Windows, KDE 
etc.

hobbs added on 2002-06-05 03:53:07:
Logged In: YES 
user_id=72656

This doesn't correctly handle the changing of -entrybg after 
the fact.  Also, is it really correct to tie the listbox 
background to the entry background?

bach added on 2002-02-18 23:06:55:

File Added - 18052: combo.tar

Attachments: