Tk Library Source Code

View Ticket
Login
Ticket UUID: 2807256
Title: Combobox sets X-selection
Type: Bug Version: None
Submitter: eriklns Created on: 2009-06-16 16:27:20
Subsystem: bwidget Assigned To: oehhar
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2009-07-08 00:32:01
Resolution: Accepted Closed By: oehhar
    Closed on: 2009-07-07 17:32:01
Description:
When selecting an item in a Combobox, the X-selection is also set. Personally, I find this "feature" annoying. (I'm not sure about standards compliance, though.)

The purpose of a combobox is to select an item from a list, not to select characters from a text for copy/paste actions.
In case there is doubt about the usefulness of this feature, it could be made an option to the Combobox command.

The attached patch against BWidget 1.8.0 turns this behaviour off.
User Comments: oehhar added on 2009-07-08 00:32:01:
After this E-Mail from Erik Leunissen:
The lines commented out in the above snippet are the changes proposed by
patch 981545. They do exactly as I propose in a user-configurable
manner. Just tested with [ComboBox -exportselection 0].

I definitely support patch 981545.

Oh, and personally I'd prefer the default value for -exportselection to
be "0". Maybe that this is a matter of taste ...
-END-

patch 981545 was commited to cvs.

Thank you,
Harald

oehhar added on 2009-07-07 13:03:46:
The proposal is to add:
    $path.e selection range 0 end
after
    $path.e selection clear
within function ComboBox::_select of file combobox.tcl.

IMHO it is included in BWidget release 1.8 and in the current cvs.

Please see the following patch reference where tests was made.
(I did not test anything now)

https://sourceforge.net/tracker/?func=detail&aid=981545&group_id=12883&atid=312883

Is the parameter -exportselection 0 sufficient for you ?

eriklns added on 2009-06-16 23:27:22:

File Added - 331202: combobox.patch

Attachments: