BBjSysGui::getActiveWindow

Description

In BBj 2.01 and higher, this method returns the window object of the current active or focused window.

Syntax

Return Value

Method

BBjWindow

getActiveWindow()

Parameters

None.

Return Value

Returns the window object of the current active window or NULL if there are no active windows.

Remarks

None.

Example

open(1)"X0"
sg! = BBJAPI().getSysGui()
print sg!.getActiveContext()
print sg!.getActiveWindow()
sg!.setContext(1)
win1! = sg!.addWindow(100,100,300,300,"Win1",$02$)
sg!.setContext(2)
win2! = sg!.addWindow(200,200,300,300,"Win2",$80002$)
sg!.setContext(3)
win3! = sg!.addWindow(300,300,300,300,"Win3",$02$)
print sg!.getActiveWindow()
callback(ON_CLOSE,CLOSEWIN,2)
process_events

CLOSEWIN:
    print(1)'context'(2)
    print(1)'destroy'(0)
    print sg!.getActiveWindow()
return

See Also

BBjAPI

BBjWindow

NULL() Function

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