ookami has asked for the wisdom of the Perl Monks concerning the following question:

Revered Monks,

I have a Perl/Tk application (running on AIX 5.1, Perl 5.6.1) that has a scrolled ListBox that allows multiple selections. After selections have been made, if a BrowseEntry widget is changed, it clears the selection of the ListBox. The BrowseEntry widget has a sub in -browsecommand that will destroy a frame containing other non-related widgets. The ListBox is not in the same frame as the BrowseEntry (nor is it in the frame that gets destroyed). The entries in the ListBox are deselected before the frame is destroyed, and if no change in selection is made (i.e. the arrow is clicked, displaying the entries in the BrowseEntry, but focus is given somewhere else and the BrowseEntry closes) the entries in the ListBox are not deselected. What am I missing here?
  • Comment on Making a BrowseEntry selection clears selections in a scrolled ListBox

Replies are listed 'Best First'.
Re: Making a BrowseEntry selection clears selections in a scrolled ListBox
by tall_man (Parson) on Nov 01, 2004 at 20:34 UTC
    I sometimes find ListBox widgets will not work well with other Tk widgets unless "-exportselection => 0" has been set.
      That fixed it. Thanks!