BBjGrid::getClientAreaHeight

Description

In BBj 17.0 and higher, this method returns the client area height.

Syntax

Return Value

Method

int

getClientAreaHeight()

Parameters

None.

Return Value

Returns the BBjInteger value of the client area height. The client area is defined as the area in which the grid cells can render without including the horizontal scrollbar height and headers.

Remarks

None.

Example

declare BBjSysGui sysgui!
declare BBjTopLevelWindow win!

sysgui! = BBjAPI().openSysGui("X0")
title$ = "29291: "+cvs(sys,3)+" "+cvs(rev,3)
win! = sysgui!.addWindow(0,0,1600,900,title$,$00090003$)
win!.setCallback(win!.ON_CLOSE,"eoj")

dim grids![16]
dim buttons![16] 

for i = 0 to 15
    grids![i] = win!.addGrid(101+i,mod(200*i,1600),int(i/8)*450,190,400,$8040$,50,5)
    buttons![i] = win!.addButton(201+i,mod(200*i,1600),410+int(i/8)*450,190,25,"Button "+str(i))
    
    H=mod(i,16)<8
    V=mod(i,8)<4
    R=mod(i,4)<2
    C=mod(i,2)<1
    grids![i].setHorizontalScrollBarAlways(H)
    grids![i].setHorizontalScrollable(H)
    grids![i].setVerticalScrollBarAlways(V)
    grids![i].setVerticalScrollable(V)
    grids![i].setHasRowHeader(R)
    grids![i].setHasColumnHeader(C)   
    
    buttons![i].setUserData(grids![i])
    buttons![i].setCallback(BBjButton.ON_BUTTON_PUSH,"button") 
next i 

process_events 

eoj:
release

button:
    declare BBjButtonPushEvent bpEvent!
    declare BBjButton button!
    declare BBjStandardGrid grid!
    
    bpEvent!=cast(BBjButtonPushEvent, sysgui!.getLastEvent())
    button!=bpEvent!.getButton()
    grid!=cast(BBjStandardGrid,button!.getUserData())
    
    message$="Client Area Height: "+str(grid!.getClientAreaHeight())+"    Client Area Width: "+str(grid!.getClientAreaWidth()) 
    
    x=msgbox(message$)
return

See Also

BBjAPI

BBjSysGui

BBjWindow

BBjGrid::getClientAreaWidth

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