Tk emergency

C

Carl Youngblood

I'm trying to code up a quick app with an urgent deadline and I'm having
trouble with a TkListbox. I have two listboxes in my app, and whenever
I make a selection in one of them, the one that lost focus loses its
selection. I need them to keep their selections even when they lose
focus. There has to be a simple way to do this, but I'm new to Tk and
don't know how to do it.

Thanks for the help.

Carl Youngblood
 
M

Mike Hall

Carl said:
I'm trying to code up a quick app with an urgent deadline and I'm having
trouble with a TkListbox. I have two listboxes in my app, and whenever
I make a selection in one of them, the one that lost focus loses its
selection. I need them to keep their selections even when they lose
focus.

This might help, from the standard Tk documentation:

Command-Line Name: -exportselectionDatabase Name: exportSelectionDatabase Class: ExportSelectionSpecifies whether or not a selection in the widget should also be the X selection. The value may have any of the forms accepted by Tcl_GetBoolean, such as true, false, 0, 1, yes, or no. If the selection is exported, then selecting in the widget deselects the current X selection, selecting outside the widget deselects any widget selection, and the widget will respond to selection retrieval requests when it has a selection. The default is usually for widgets to export selections.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top