BBjGrid::showCalendarForCell

Description

In BBj 19.00 and higher, this method programmatically calls the calendar popup on an InputD cell.

Syntax

Return Value

Method

boolean

showCalendarForCell()

showCalendarForCell(boolean p_stopCellEdit)

showCalendarForCell(int p_row, int p_column)

showCalendarForCell(int p_row, int p_column, boolean p_stopCellEdit)

Parameters

Variable

Description

p_stopCellEdit

Specifies if the InputD should leave edit mode after a date is selected by the user and the calendar is dismissed.

p_row

Specifies the row of the cell within the grid.

p_column

Specifies the column of the cell within the grid.

Return Value

Returns True if the specified, active, or selected cell's style was an InputD and the calendar was selected. Returns False if the cell's style was not an InputD.

Remarks

If no row and column are specified, the calendar will be requested for the currently selected cell.

If the cell is not an InputD, no calendar will be displayed and no exception will be thrown.

The default value for p_stopCellEdit is False. Thus, if no boolean value is provided for p_stopCellEdit, the cell will remain in edit mode after the calendar has been dismissed by the user.

Example

declare BBjSysGui sysgui!
declare BBjWindow win!
declare BBjStandardGrid grid!
declare BBjInputD inputd!
sysgui!=BBjAPI().openSysGui("X0")
win!=sysgui!.addWindow(0,0,640,480,"Grid Testing Program")
grid!=win!.addGrid(101,0,0,640,400,$8040$,10,10)
grid!.setCellStyle(0,0,BBjGrid.GRID_STYLE_INPUTD)
grid!.setEditable(1)
print grid!.showCalendarForCell()
process_events

See Also

BBjAPI

BBjInputD::calendar

BBjGridCell

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