in reply to Re: simultaneous selections in Tk
in thread simultaneous selections in Tk

This seems to work. Not the first thing I thought of.
Thank you.

Replies are listed 'Best First'.
Re^3: simultaneous selections in Tk
by zentara (Cardinal) on Nov 02, 2008 at 18:49 UTC
    Not the first thing I thought of

    Heh, heh....don't worry, I think every Tk user has asked that question the first time they use Listboxes..... I did too. :-) It is listed as an option in the perldoc, but dosn't say what it's for.


    I'm not really a human, but I play one on earth Remember How Lucky You Are
      It is listed as an option in the perldoc, but dosn't say what it's for.

      True, "perldoc Tk::Listbox" only mentions the "exportSelection" option with the cryptic remark "(see exportSelection option)", and you have to know that this means "go to 'perldoc Tk::options'", where you'll find (in proper alphabetical order):

      Specifies 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.

      Update: Even with that, the option might still be hard to understand for people who use Perl/Tk without the benefit of an X-Windows environment (i.e. on MS-Windows systems) -- I guess such users wouldn't quite know what it means until they happen to guess that it might be worthwhile to try it out.

        Even with that, the option might still be hard to understand

        No doubt, especially for someone just starting to learn about gui's. I will save this node for the inevitable "next time" this question is asked. Thanks to graff for digging that out.

        It does seem that the perldoc for the Listbox should have a small section for "Multiple Listbox Usage".


        I'm not really a human, but I play one on earth Remember How Lucky You Are