BBjGrid::setCalendarSize

Description

In BBj 25.02 and higher, this method sets the size of the popup calendar associated with BBjInputD cells on this grid control.

Syntax

Return Value Method
void setCalendarSize(int width, int height)

Parameters

Parameter Description
width Specifies the width in pixels.
height Specifies the height in pixels.

Return Value

None.

Remarks

  • This method is specifically intended for GUI environments and does not apply to BUI or DWC.

  • To revert to the standard calendar size, set the width and height to 0.

Example

title$ = "BBjGrid::setCalendarSize"
sysgui! = BBjAPI().openSysGui("X0")
window! = sysgui!.addWindow(50,50,800,600,title$,$00090083$)
window!.setCallback(window!.ON_CLOSE,"eoj")
window!.setCallback(window!.ON_RESIZE,"resize")
grid! = window!.addGrid(101,25,25,750,500,$814a$,20,3)
grid!.setEditable(1)
grid!.setFitToGrid(1)
grid!.setLineColor(BBjColor.LIGHT_GRAY)
grid!.setRowHeight(30)
grid!.setColumnStyle(0,BBjGrid.GRID_STYLE_INPUTD)
button! = window!.addButton(1,25,550,150,25,"showCalendarForCell",$$)
button!.setCallback(button!.ON_BUTTON_PUSH,"showCalendarForCell")
width! = window!.addInputNSpinner(102,200,550,175,25,$$,"###0",$$,0,300,0,500)
width!.setToolTipText("Width")
height! = window!.addInputNSpinner(103,400,550,175,25,$$,"###0",$$,0,300,0,500)
height!.setToolTipText("Height")
process_events
eoj:
  release
resize:
  event! = sysgui!.getLastEvent()
  width = event!.getWidth()
  height = event!.getHeight()
  height!.setLocation(400,height-50)
  width!.setLocation(200,height-50)
  button!.setLocation(25,height-50)
  grid!.setSize(width-50,height-100)
return
showCalendarForCell:
  width = width!.getValue()
  height = height!.getValue()
  grid!.setCalendarSize(width,height)
  print grid!.showCalendarForCell()
return

ClosedVersion History

  • BBj 25.02: Added BBjGrid::setCalendarSize

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

Interface CommonGrid::setColumnStyle

BBjGrid::showCalendarForCell

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