Find out which item(s) are currently selected? |
Call the "curselection" method, which returns a list of the indices (0..n-1) of the selected items. |
Change which items(s) are currently selected. |
To deselect all items in a range, call "selection clear firstidx ?lastidx?".
To select all items in a range, call "selection set firstidx ?lastidx?". |
Disable the listbox? |
Set the "state" configuration option to "disabled".
To re-enable, set the "state" configuration option to "normal". |
Find out what item is at a given index? |
Look at that item in the list held in the variable named in the listvariable option. |
Make sure a particular item is in view? |
Call the "see index" method.
|
---|
Tell when the selection in the listbox changes? |
You can bind to the "<ListboxSelect>" virtual event. |