BBjListBox::setTextAt

Description

In BBj 15.0 and higher, this method updates the text on an existing BBjListBox index.

Syntax

Return Value

Method

void

setTextAt(int index, string text)

Parameters

Variable

Description

index

Specifies the 0-based list index.

string

Specifies the text to display on the specified list index.

Return Value

None.

Remarks

None.

Example

rem ' BBjListBox setTextAt

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(100,100,200,200,"listbox",$00090003$)
window!.setCallback(window!.ON_CLOSE,"eoj")

list$ = ""; for i = 0 to 9;
list$ = list$ + str(i) + $0a$; next i
listbox! = window!.addListBox(101,25,25,150,150,list$,$0000$)
im! = sysgui!.getImageManager()
amex! = im!.loadImageFromFile("amex.png")
listbox!.setImageAt(0,amex!)
listbox!.setTextAt(0,"Amex")
mastercard! = im!.loadImageFromFile("mastercard.png")
listbox!.setImageAt(1,mastercard!)
listbox!.setTextAt(1,"MasterCard")
visa! = im!.loadImageFromFile("visa.png")
listbox!.setImageAt(2,visa!)
listbox!.setTextAt(2,"Visa")
first$ = "com/basis/bbj/images/NavigatorFirst.gif"
first! = im!.loadImageFromServerJar(first$)
listbox!.setImageAt(4,first!)
listbox!.setTextAt(4,"First")
prev$ = "com/basis/bbj/images/NavigatorPrevious.gif"
prev! = im!.loadImageFromServerJar(prev$)
listbox!.setImageAt(5,prev!)
listbox!.setTextAt(5,"Previous")
next$ = "com/basis/bbj/images/NavigatorNext.gif"
next! = im!.loadImageFromServerJar(next$)
listbox!.setImageAt(6,next!)
listbox!.setTextAt(6,"Next")
last$ = "com/basis/bbj/images/NavigatorLast.gif"
last! = im!.loadImageFromServerJar(last$)
listbox!.setImageAt(7,last!)
listbox!.setTextAt(7,"Last")

process_events

eoj:
release

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

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