BB___SELECT

=SELECT= toc

Description
> Selects the Listbox or Combobox list item matching the //string parameter// and updates the display. > For SELECT as used in SELECT CASE statements, see SELECT CASE

Hints

 * //**Text Selection.**// Use SELECT when working with the text content of a list item, rather than its index number.

Example
code format="lb" 'Using SELECT with a list nomainwin a$(1) = "apple" a$(2) = "orange" a$(3) = "banana" a$(4) = "pear"

listbox #win.lst, a$,doLst, 10, 10, 120, 200

open "Select Demo" for window as #win ' Use SELECT to highlight the default selection
 * 1) win "trapclose Quit"
 * 1) win.lst "select banana"

wait

sub Quit handle$ close #handle$ end end sub

sub doLst handle$ #handle$ "selection? sel$" notice "You chose ";sel$ end sub code

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