BBjStandardGrid::setRowHeaderCellVerticalAlignment

Description

In BBj 7.00 and higher, this method sets the vertical alignment of the row header cell in the BBjStandardGrid.

Syntax

Return Value Method
void setRowHeaderCellVerticalAlignment(int row, int align)

Parameters

Parameter Description
row Specifies the zero-based row index.
align

Specifies the vertical alignment from one of the following Align Value Constants:

  • GRID_ALIGN_TOP
  • GRID_ALIGN_CENTER
  • GRID_ALIGN_BOTTOM

Return Value

None.

Remarks

By default, the vertical alignment is GRID_ALIGN_CENTER.

Example

rem ' BBjStandardGrid::setRowHeaderCellVerticalAlignment
sysgui! = bbjapi().openSysGui("X0")
title$ = "BBjStandardGrid::setRowHeaderCellVerticalAlignment"
window! = sysgui!.addWindow(25,25,800,600,title$,$00090083$)
window!.setCallback(window!.ON_CLOSE,"eoj")
window!.setCallback(window!.ON_RESIZE,"resize")
styles! = window!.addRadioGroup()
inpute! = window!.addRadioButton(91,25,25,175,25,"GRID_STYLE_INPUTE",$0004$)
inpute!.setCallback(inpute!.ON_CHECK_ON,"grid_style_inpute")
styles!.add(inpute!)
button! = window!.addRadioButton(92,200,25,175,25,"GRID_STYLE_BUTTON_UP",$0000$)
button!.setCallback(button!.ON_CHECK_ON,"grid_style_button_up")
styles!.add(button!)
label! = window!.addRadioButton(93,375,25,175,25,"GRID_STYLE_LABEL",$0000$)
label!.setCallback(label!.ON_CHECK_ON,"grid_style_label")
styles!.add(label!)
text! = window!.addRadioButton(94,550,25,175,25,"GRID_STYLE_TEXT",$0000$)
text!.setCallback(text!.ON_CHECK_ON,"grid_style_text")
styles!.add(text!)
grid! = window!.addGrid(101,25,75,750,500,$8046$,3,3)
grid!.setEditable(1)
grid!.setLineColor(BBjColor.LIGHT_GRAY)
grid!.setRowHeight(150)
grid!.setDefaultColumnWidth(220)
grid!.setMainGridVerticalAlignment(grid!.GRID_ALIGN_BOTTOM)
grid!.setRowHeaderCellVerticalAlignment(0,grid!.GRID_ALIGN_TOP)
grid!.setRowHeaderCellVerticalAlignment(1,grid!.GRID_ALIGN_CENTER)
grid!.setRowHeaderCellVerticalAlignment(2,grid!.GRID_ALIGN_BOTTOM)
grid!.setRowVerticalAlignment(0,grid!.GRID_ALIGN_TOP)
grid!.setRowVerticalAlignment(1,grid!.GRID_ALIGN_CENTER)
grid!.setRowVerticalAlignment(2,grid!.GRID_ALIGN_BOTTOM)
grid!.setColumnAlignment(0,grid!.GRID_ALIGN_LEFT)
grid!.setColumnAlignment(1,grid!.GRID_ALIGN_CENTER)
grid!.setColumnAlignment(2,grid!.GRID_ALIGN_RIGHT)
grid!.setColumnHeaderCellAlignment(0,grid!.GRID_ALIGN_LEFT)
grid!.setColumnHeaderCellAlignment(1,grid!.GRID_ALIGN_CENTER)
grid!.setColumnHeaderCellAlignment(2,grid!.GRID_ALIGN_RIGHT)
for col=0 to 2
  grid!.setColumnHeaderCellText(col,str(col))
next col
info$ = ""
info$ = info$ + "LEFT="+str(grid!.GRID_ALIGN_LEFT)
info$ = info$ + " CENTER="+str(grid!.GRID_ALIGN_CENTER)
info$ = info$ + " RIGHT="+str(grid!.GRID_ALIGN_RIGHT)
info$ = info$ + "; TOP="+str(grid!.GRID_ALIGN_TOP)
info$ = info$ + " CENTER="+str(grid!.GRID_ALIGN_CENTER)
info$ = info$ + " BOTTOM="+str(grid!.GRID_ALIGN_BOTTOM)
print info$
for row=0 to 2
  grid!.setRowHeaderCellText(row,str(row))
  for col=0 to 2
    grid!.setCellText(row,col,str(row)+","+str(col))
    r = 128 + rnd(128), g = 128 + rnd(128), b = 128 + rnd(128)
    grid!.setCellBackColor(row,col,sysgui!.makeColor(r,g,b))
  next col
  print "row",row,": getRowHeaderCellVerticalAlignment",
  print grid!.getRowHeaderCellVerticalAlignment(row)
  print "row",row,": getRowVerticalAlignment",
  print grid!.getRowVerticalAlignment(row)
next row
process_events
eoj:
  release
resize:
  event! = sysgui!.getLastEvent()
  grid!.setSize(event!.getWidth()-50,event!.getHeight()-100)
return
grid_style_inpute:
  grid!.setDefaultGridStyle(grid!.GRID_STYLE_INPUTE)
return
grid_style_button_up:
  grid!.setDefaultGridStyle(grid!.GRID_STYLE_BUTTON_UP)
return
grid_style_label:
  grid!.setDefaultGridStyle(grid!.GRID_STYLE_LABEL)
return
grid_style_text:
  grid!.setDefaultGridStyle(grid!.GRID_STYLE_TEXT)
return

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

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