BBjTopLevelWindow::getNominalHeight

Description

In BBj 23.04 and higher, this method returns the nominal height of a BBjTopLevelWindow, with no adjustment for any scrollbars.

Syntax

Return Value Method
int getNominalHeight()

Parameters

None.

Return Value

Returns the nominal height of a BBjTopLevelWindow, with no adjustment for any scrollbars.

Example

sysgui = unt
open (sysgui)"X0"
status = 0
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(100,100,500,500,"Nominal Window Size",$8009008f$)
window!.setSize(200,200)
window!.setCallback(window!.ON_CLOSE,"eoj")
window!.setCallback(window!.ON_RESIZE,"resize")
info! = window!.addButton(1,25,25,150,25,"Get Size")
info!.setCallback(info!.ON_BUTTON_PUSH,"info")
setSize! = window!.addButton(2,25,75,150,25,"Set Size")
setSize!.setCallback(setSize!.ON_BUTTON_PUSH,"setSize")
setNominalSize! = window!.addButton(3,25,125,150,25,"Set Nominal Size")
setNominalSize!.setCallback(setNominalSize!.ON_BUTTON_PUSH,"setNominalSize")
if status then status! = window!.addStatusBar(99)
process_events

eoj:
release

info:
    width = window!.getWidth()
    height = window!.getHeight()
    info$ = "BBjWindow: " + str(width) + "," + str(height) + $0a$
    width = window!.getNominalWidth()
    height = window!.getNominalHeight()
    info$ = info$ + "BBjWindow nominal: " + str(width) + "," + str(height) + $0a$
    i = msgbox(info$)
return

resize:
    event! = sysgui!.getLastEvent()
    info$ = event!.getEventName()+" "+str(event!.getWidth())+","+str(event!.getHeight())
    print info$
    if status then status!.setText(info$)
return

setSize:
    width = window!.getWidth()
    height = window!.getHeight()
    window!.setSize(width,height)
    info$ = "setSize "+str(width)+","+str(height)
    print info$
    if status then status!.setText(info$)
return

setNominalSize:
    width = window!.getNominalWidth()
    height = window!.getNominalHeight()
    window!.setSize(width,height)
    info$ = "setNominalSize "+str(width)+","+str(height)
    print info$
    if status then status!.setText(info$)
return

ClosedVersion History

  • BBj 23.04: BBjTopLevelWindow::getNominalHeight added.

See Also

BBjAPI

BBjSysGui

BBjTopLevelWindow::getNominalWidth

BBjControl

BBjWindow

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