BBjStandardGrid::setRowHeaderCellIcon

Description

Sets the icon in a row header cell in the BBjStandardGrid.

Syntax

Return Value

Method

void

setRowHeaderCellIcon(int imageListID, int index, int row)

Parameters

Variable

Description

imageListID

Specifies the imagelist ID.

index

Specifies the 0-based index of the item in the image list.

row

Specifies the 0-based row.

Return Value

None.

Remarks

Developers can use icons from a valid image list to set icons in a grid cell. The image list is usable if developers know the control ID and if creation of the image list resulted from using ResBuilder or mnemonics. Specifying an image index of -1 removes the icon.

Example

rem ' BBjStandardGrid::setRowHeaderCellIcon
title$ = "BBjStandardGrid::setRowHeaderCellIcon"
sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(50,50,600,500,title$,$00090083$)
window!.setCallback(window!.ON_CLOSE,"eoj")
window!.setCallback(window!.ON_RESIZE,"resize")
imageManager! = sysgui!.getImageManager()
image$ = "com/basis/bbj/images/demoicons.gif"
image! = imageManager!.loadImageFromServerJar(image$)
imagelist = 1000
width = 16
sysgui!.addImageList(imagelist,width,image!)
rows = 9, cols = 9grid! = window!.addGrid(101,102,103,25,25,550,450,$91ce$,rows,cols)
grid!.setLineColor(BBjColor.LIGHT_GRAY)
grid!.setColumnHeaderHeight(40)
grid!.setRowHeight(40)
grid!.setRowHeaderWidth(100)
grid!.setFitToGrid(1)
grid!.setSnapToRowHeight(0)
for i = 0 to cols-1
  index = mod(i,4)
  image! = imageManager!.loadImageFromImageList(imagelist,index)
  grid!.setColumnHeaderCellText(i,str(i))
  grid!.setRowHeaderCellText(i,str(i))
  grid!.setRowHeaderCellIcon(imagelist,index,i)
  grid!.setColumnHeaderCellIcon(imagelist,index,i)
next i
process_events
eoj:
  release
resize:
  event! = sysgui!.getLastEvent()
  grid!.setSize(event!.getWidth()-50,event!.getHeight()-50)
return

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

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