BBjListButton::setTextAt

Description

In BBj 15.0 and higher, this method updates the text on an existing BBjListButton 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 ' BBjListButton setTextAt

sysgui = unt

open (sysgui)"X0"

sysgui! = bbjapi().getSysGui()

window! = sysgui!.addWindow(100,100,200,200,"listbutton",$00090003$)

window!.setCallback(window!.ON_CLOSE,"eoj")

list$ = ""; for i = 0 to 9; list$ = list$ + str(i) + $0a$; next i

listbutton! = window!.addListButton(101,25,25,150,150,list$,$$)

listbutton!.setFieldHeight(30)

im! = sysgui!.getImageManager()

amex! = im!.loadImageFromFile("amex.png")

listbutton!.setImageAt(0,amex!)

listbutton!.setTextAt(0,"Amex")

mastercard! = im!.loadImageFromFile("mastercard.png")

listbutton!.setImageAt(1,mastercard!)

listbutton!.setTextAt(1,"MasterCard")

visa! = im!.loadImageFromFile("visa.png")

listbutton!.setImageAt(2,visa!)

listbutton!.setTextAt(2,"Visa")

first$ = "com/basis/bbj/images/NavigatorFirst.gif"

first! = im!.loadImageFromServerJar(first$)

listbutton!.setImageAt(4,first!)

listbutton!.setTextAt(4,"First")

prev$ = "com/basis/bbj/images/NavigatorPrevious.gif"

prev! = im!.loadImageFromServerJar(prev$)

listbutton!.setImageAt(5,prev!)

listbutton!.setTextAt(5,"Previous")

next$ = "com/basis/bbj/images/NavigatorNext.gif"

next! = im!.loadImageFromServerJar(next$)

listbutton!.setImageAt(6,next!)

listbutton!.setTextAt(6,"Next")

last$ = "com/basis/bbj/images/NavigatorLast.gif"

last! = im!.loadImageFromServerJar(last$)

listbutton!.setImageAt(7,last!)

listbutton!.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



______________________________________________________________________________________

Copyright BASIS International Ltd. BBj®, Visual PRO/5®, PRO/5®, and BBx® are registered trademarks.