BB___SELECTION

=SELECTION= toc

Description
> Returns the highlighted text from a list item in a Listbox or Combobox. The selection is placed into the variable //selected$//.

Hints

 * //**No selection.**// If no text or list item is selected, the variable value will be an empty string (e.g. "").

Example
code format="lb" ' An example using SELECTION? with a listbox. nomainwin a$(1) = "one" a$(2) = "two" a$(3) = "three" a$(4) = "four"

listbox #win.listbo, a$,doListbo,10,10,120,200

open "Selection? Demo" for window as #win #win "trapclose Quit" #win.listbo "selectindex 1"

wait

sub Quit handle$ close #handle$ end end sub

sub doListbo handle$ 'Get the text value from selection and place it in sel$ variable. #handle$ "selection? sel$" notice "You chose ";sel$ end sub code

Useful Functions
code format="lb" Place a useful function using this keyword here code