BBjListButton::setImageAt

Description

In BBj 15.0 and higher, this method sets an image to display beside the text on a specified BBjListButton index.

Syntax

Return Value

Method

void

setImageAt(int index, BBjImageimage!)

Parameters

Variable

Description

index

Specifies the 0-based list index.

image!

Specifies the BBjImage that will display on the specified list index, or null() to remove a previously-specified image.

Return Value

None.

Remarks

None.

Example

rem ' BBjListButton setImageAt

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