BBjStandardGrid::setColumnListSelection

Description

Sets the selected index for the list control in the specified BBjStandardGrid column.

Syntax

Return Value

Method

void

setColumnListSelection(int column, int index, boolean repaint)

Parameters

Variable

Description

column

Specifies the 0-based column.

index

Specifies the 0-based index to select in the list.

repaint

Specifies whether to immediately repaint the column to display selected index.

Return Value

None.

Remarks

The repaint parameter is only a suggestion to the underlying look and feel. The Java Swing GUI client will usually repaint the column immediately, even if this parameter is set to false.

Example

rem ' BBjStandardGrid::setColumnListSelection
sysgui! = bbjapi().openSysGui("X0")
window! = sysgui!.addWindow(40,40,600,250,"setColumnListSelection",$00090083$)
window!.setCallback(window!.ON_CLOSE,"window_close")
list$ = ""; for c = asc("A") to asc("Z"); list$ = list$ + chr(c) + $0a$; next c
listbutton! = window!.addListButton(100,-100,-100,100,100,list$)
grid! = window!.addGrid(101,10,10,560,160,$8040$,6,2)
grid!.setLineColor(BBjColor.LIGHT_GRAY)
grid!.setRowHeight(25)
grid!.setEditable(1)
grid!.setColumnListControl(0,listbutton!)
button! = window!.addButton(1,10,180,200,25,"setColumnListSelection")
button!.setCallback(button!.ON_BUTTON_PUSH,"setColumnListSelection")
repaint! = window!.addCheckBox(201,220,180,200,25,"Repaint")
status! = window!.addStatusBar(99)
process_events
window_close:
   release
setColumnListSelection:
   index = rnd(26)
   repaint = repaint!.isSelected()
   grid!.setColumnListSelection(0,index,repaint!.isSelected())
   status$ = "setColumnListSelection(0,"+str(index)+","
   status$ = status$ + str(repaint)+": "+chr(asc("A")+index)
   status!.setText(status$)
   return

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

Data Aware Grid Channels

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