jdtoronto,
Given the overwhelming response you've gotten so far ;-), I'd like to ask if you have a minimal set of working code of what you've tried - because then I may be able to take it and tweak it. Note that I have absolutely zero Tk experience, and the last time I did any GUI work was Delphi on a Win95 beta, and, before that, Win32 SDK (without MFC or anything helpful). And I've not done any Windows programming since '96. :-) But I might be able to tweak something that someone gives as an example.
Oh, and I think you mean Tk::BrowseEntry, and not JBrowseEntry, right?
| [reply] |
As much as I hate to say it, selecting multiple items from a List is generally NOT a good use of a Combo Box type widget -- especially since most trigger a selection instantly after the first item is selected. Is there a reason that this has to be a Combo Box (or Tk::JBrowseEntry to be precise)? I believe that none of the current Tk Combo Box type widgets provide the functionality that you are looking for.
One of the problems is how is the Entry supposed to display the results of a multiple selection? Comma-separated words? What happens if one of the items in the list contains a comma or whatever delimiter you plan on using?
Here are some alternatives:
- Just use a listbox. It already allows for
multiple selection. Do you need user-defined entries? Try using using an entry and a button that adds entries to the Listbox. Too many widgets on Screen? Create a button underneath or above the Listbox that triggers a popup Entry to add a new item to the Listbox (pretty much the reverse of what is typically done with a combo box).
- Try using a Menu with CheckButtons if the list is fairly small and static.
| [reply] |
Well now that I got Tk::JBrowseEntry, the answer is right in the perldoc
"but user may
only ultimately select one of the items in the list"
You would be better off rolling your own with a listbox.
I'm not really a human, but I play one on earth.
flash japh
| [reply] [d/l] |
No documentation found for "Tk::JBrowseEntry".But I think you will have to roll your own. You could try to use the subwidget method, to get the Listbox out of your parent widget, and change it's selectmode to multiple, but there are alot of complications.....like most widgets have code to automatically insert the first selection at the first mouse click.
I'm not really a human, but I play one on earth.
flash japh
| [reply] |
http://search.cpan.org/~turnerjw/Tk-JFileDialog-1.21/Tk/JBrowseEntry.pm
| [reply] |