in reply to How can I get the index of the currently selected Tk::BrowseEntry element?
Tk::Browsentry is a composite widget that includes several subwidgets, including a listbox to hold your selectable items. Per the docs, the listbox is an advertized subwidget named "slistbox". So, first you need to get a reference to the listbox subwidget:
$listbox = $dropdown->Subwidget('slistbox');Then call the appropriate method to retreive a list of selected indexes for the listbox subwidget (see listbox widget docs):
@indexes = $listbox->curselection;
|
---|