wx.MDIParentFrame

Inheritance diagram for wx.MDIParentFrame:



Description

An MDI (Multiple Document Interface) parent frame is a window which can contain MDI child frames in its own ‘desktop’. It is a convenient way to avoid window clutter, and is used in many popular Windows applications, such as Microsoft Word(TM).

Window Styles

Window Style Description
wx.CAPTION Puts a caption on the frame.
wx.DEFAULT_FRAME_STYLE Defined as wx.MINIMIZE_BOX | wx.MAXIMIZE_BOX | wx.THICK_FRAME | wx.SYSTEM_MENU | wx.CAPTION.
wx.HSCROLL Displays a horizontal scrollbar in the client window, allowing the user to view child frames that are off the current view.
wx.ICONIZE Display the frame iconized (minimized) (Windows only).
wx.MAXIMIZE Displays the frame maximized (Windows only).
wx.MAXIMIZE_BOX Displays a maximize box on the frame (Windows and Motif only).
wx.MINIMIZE Identical to wx.ICONIZE.
wx.MINIMIZE_BOX Displays a minimize box on the frame (Windows and Motif only).
wx.RESIZE_BORDER Displays a resizeable border around the window (Motif only; for Windows, it is implicit in wx.THICK_FRAME).
wx.STAY_ON_TOP Stay on top of other windows (Windows only).
wx.SYSTEM_MENU Displays a system menu (Windows and Motif only).
wx.THICK_FRAME Displays a thick frame around the window (Windows and Motif only).
wx.VSCROLL Displays a vertical scrollbar in the client window, allowing the user to view child frames that are off the current view.
wx.FRAME_NO_WINDOW_MENU Under Windows, removes the Window menu that is normally added automatically.

Remarks

There may be multiple MDI parent frames in a single application, but this probably only makes sense within programming development environments.

Child frames may be of class wx.MDIChildFrame (contained within the parent frame) or wx.Frame (shown as a top-level frame).

An MDI parent frame always has a wx.MDIClientWindow associated with it, which is the parent for MDI child frames. This client window may be resized to accommodate non-MDI windows, as seen in Microsoft Visual C++ (TM) and Microsoft Publisher (TM), where a documentation window is placed to one side of the workspace.

MDI remains popular despite dire warnings from Microsoft itself that MDI is an obsolete user interface style.

The implementation is native in Windows, and simulated under Motif. Under Motif, the child window frames will often have a different appearance from other frames because the window decorations are simulated.

Properties Summary

Class API

Methods

__init__(parent, id=-1, title="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE|wx.VSCROLL|wx.HSCROLL, name=wx.FrameNameStr)

Constructor.

Parameters:


Returns:

wx.MDIParentFrame


ActivateNext()
Activates the MDI child following the currently active one.

See also

ActivatePrevious


ActivatePrevious()
Activates the MDI child preceding the currently active one.

See also

ActivateNext


ArrangeIcons()
Arranges any iconized (minimized) MDI child windows.

See also

Cascade, Tile


Cascade()
Arranges the MDI child windows in a cascade.

See also

Tile, ArrangeIcons


GetActiveChild()

Returns a pointer to the active MDI child, if there is one.


Returns:

wx.MDIChildFrame


GetClientWindow()

Returns a pointer to the client window.


Returns:

wx.MDIClientWindow


GetWindowMenu()

Returns the current Window menu (added by wxWidgets to the menubar). This function is available under Windows only.


Returns:

wx.Menu


SetWindowMenu(menu)

Call this to change the current Window menu. Ownership of the menu object passes to the frame when you call this function. This call is available under Windows only.

To remove the window completely, use the wx.FRAME_NO_WINDOW_MENU window style.

Parameters:


Tile(orient=wx.HORIZONTAL)

Tiles the MDI child windows either horizontally or vertically depending on whether orient is wx.HORIZONTAL or wx.VERTICAL.

Currently only implemented for MSW, does nothing under the other platforms.

Parameters:

  • orient (int)

Properties

ActiveChild
See GetActiveChild
ClientWindow
See GetClientWindow