BBjGrid::getScrollbarTriggerTopBottomEvent

Description

In BBj 20.10 and higher, this method returns value of the boolean flag indicating whether the BBjGridHitTopEvent and BBjGridHitBottomEvent events will trigger from the scrollbar.

Syntax

Return Value Method
boolean getScrollbarTriggerTopBottomEvent()

Parameters

None.

Return Value

Returns a boolean indicating whether the scrollbar will trigger the BBjGridHitTopEvent and BBjGridHitBottomEvent events.

Remarks

The default value is true, which indicates that the events will trigger when the scrollbar hits the bottom or top of the grid. A value of false indicates that the events will not trigger from the scrollbar.

The events will still trigger when using page up/down or the up/down arrows when trying to move beyond the grid’s scope of rows. This value only refers to the scrollbar’s ability to trigger the events.

This behavior can be set by BBjGrid::setScrollbarTriggerTopBottomEvent, or globally in the bbj.properties file by adding the line: com.basis.bbj.grid.disableScrollbarEvent=x, where x is equal to “true” or “false”.

Example

rem ' BBjGrid Scrollbar Events Example

call"_setup",16
w=100,h=40; ? 'size'(w,h),'window'(0,0,w,h),'cs','show'

sysgui = unt
open (sysgui) "X0"
gui!   = BBJAPI().getSysGui()

w!  = gui!.addWindow(10,10,800,400,"RowSelection " + rev)
w!.setCallback(w!.ON_CLOSE, "quit")
c!  = w!.addChildWindow(100,10,10,780,380,5)
colHeaderHeight=25
rowHeight=14
rowCount=4
addEmptyRow = msgbox("Add empty row?",32+4)
? addEmptyRow
g!  = c!.addGrid(200,5,5,770,colHeaderHeight+(rowCount*20)+8+iff(addEmptyRow=6,1,0),$81E6$,rowCount,2)
g!.setColumnHeaderHeight(colHeaderHeight)

rem 'turns the events off.
g!.setScrollbarTriggerTopBottomEvent(0)
g!.getScrollbarTriggerTopBottomEvent()

g!.setScrollUpdate(1)
g!.setVerticalScrollable(1)
g!.setVerticalScrollBarAlways(1)
g!.setPaging(1)

g!.setGridEditable(0)
g!.setEditClickCount(1)
g!.setSelectionMode(g!.GRID_SELECT_ROW)
g!.setRowHeight(rowHeight)
? g!.getRowHeight()

gridRows = g!.getNumRows()

while gridRows > -1
    g!.setCellText(gridRows, 0, str(gridRows))
    gridRows = gridRows - 1
wend

g!.setCallback(g!.ON_GRID_HIT_TOP, "hitTop")
g!.setCallback(g!.ON_GRID_HIT_BOTTOM, "hitBottom")

HITT=1
HITB=1
process_events

quit:
    w!.destroy()
    close (sysgui)
release
end

hitTop:
    ? "hit top "+STR(HITT)
    HITT=HITT+1
return

hitBottom:
    ? "hit bottom "+STR(HITB)
    HITB=HITB+1
return

ClosedVersion History

  • BBj 20.10: BBjGrid::getScrollbarTriggerTopBottomEvent introduced

See Also

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

BBjAPI

BBjGrid

BBjGrid::setScrollbarTriggerTopBottomEvent

BBjGridHitBottomEvent

BBjGridHitTopEvent