BBjMDI::setDefaultMDIMode


Description

In BBj 9.0 and higher, this method sets the default MDIMode that will be used when new BBjSessions are launched within this MDI.

Syntax

Return Value

Method

void

setDefaultMDIMode(string MDIMode)

Parameters

Variable

Description

MDIMode

Specifies the mode in which new BBjSessions will be launched.

Return Value

None.

Remarks

MDIMode must be one of the following strings:

String Description
MDI The legacy MDI mode. Child window is confined to the user area of the MDI Master and the child will be terminated when the MDI master is closed
SDI The child window is not confined to the user area of the MDI Master.  The child may appear behind the MDI master in the windows z-order.  The child will be terminated when the MDI master is closed

DETACHED

In BBj 9.0 and Higher. Child is completely independent of the MDI Master and will not be terminated when the MDI master is closed. Child may appear in front of the MDI Master or may appear behind the MDI master.

The default MDIMode may be overridden by setting the MDIMode for a particular session  using BBjCommandLineObject.setChildFrameMode() or by adding the –MDI command line option to the command used when doing an SCALL.

Example

X0 = unt; open(X0)"X0"

SysGui! = BBjAPI().getSysGui()

MDI!    = BBjAPI().getMDI()

MDI!.createMDIWindow(5, 5, 950, 700, "Test-MDI")

MDI!.setDefaultMDIMode("MDI")

Print MDI!.getDefaultMDIMode()

BBjConfig! = BBjAPI().getConfig()

NewCmd!    = BBjConfig!.getCurrentCommandLineObject()

NewCmd!.setProgramName("mdiClient.src")

BBjAPI().newBBjSession(NewCmd!)

NewCmd!    = BBjConfig!.getCurrentCommandLineObject()

NewCmd!.setProgramName("mdiClient.src")

NewCmd!.setChildFrameMode("SDI")

BBjAPI().newBBjSession(NewCmd!)

CALLBACK(ON_CLOSE, APP_CLOSE, MDI!.MDI_CONTEXT)

process_events

APP_CLOSE:

MDI!.closeAll(0)

Release

See Also

BBjAPI

BBjMDI

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