BBjListBox::getSelectedItems

Description

In BBj 23.04 and higher, this method returns a BBjVector containing all of the currently selected items in the BBjListBox control.

Syntax

Return Value Method
BBjVector getSelectedItems()

Parameters

None.

Return Value

Returns a BBjVector which contains the currently selected items. It's possible for no items to be selected.

Example

rem ' BBjListBox::getSelectedItems

sysgui = unt
open (sysgui)"X0"

sysgui! = bbjapi().getSysGui()

window! = sysgui!.addWindow(25,25,200,400,"getSelectedItems",$00090083$)
window!.setCallback(window!.ON_CLOSE,"eoj")

items$ = ""
for i = asc("A") to asc("Z")
    items$ = items$ + chr(i) + $0a$
next i

listbox! = window!.addListBox(101,25,25,150,300,items$,$0400$)
listbox!.selectIndex(2)
listbox!.selectIndex(3)

getSelectedItems! = window!.addButton(1,25,350,150,25,"getSelectedItems")
getSelectedItems!.setCallback(getSelectedItems!.ON_BUTTON_PUSH,"getSelectedItems")

process_events

eoj:
release

getSelectedItems:
    vector! = listbox!.getSelectedItems()
    i = msgbox(str(vector!),0,"getSelectedItems")
return

ClosedVersion History

  • BBj 23.04: BBjListBox::getSelectedItems added.

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.