wxRuby Documentation Home

# Wx::MDIChildFrame

An MDI child frame is a frame that can only exist on a MDIClientWindow,
which is itself a child of MDIParentFrame.

## Derived from

Frame

Window

EvtHandler

Object

## Window styles

`CAPTION` | Puts a caption on the frame.
`DEFAULT_FRAME_STYLE` | Defined as MINIMIZE_BOX * MAXIMIZE_BOX * THICK_FRAME * SYSTEM_MENU * CAPTION.
`ICONIZE` | Display the frame iconized (minimized) (Windows only).
`MAXIMIZE` | Displays the frame maximized (Windows only).
`MAXIMIZE_BOX` | Displays a maximize box on the frame (Windows and Motif only).
`MINIMIZE` | Identical to ICONIZE.
`MINIMIZE_BOX` | Displays a minimize box on the frame (Windows and Motif only).
`RESIZE_BORDER` | Displays a resizeable border around the window (Motif only;for Windows, it is implicit in THICK_FRAME).
`STAY_ON_TOP` | Stay on top of other windows (Windows only).
`SYSTEM_MENU` | Displays a system menu (Windows and Motif only).
`THICK_FRAME` | Displays a thick frame around the window (Windows and Motif only).

See also window styles overview.

## Remarks

Although internally an MDI child frame is a child of the MDI client window, in Widgets
you create it as a child of MDIParentFrame. You can usually
forget that the client window exists.

MDI child frames are clipped to the area of the MDI client window, and may be iconized
on the client window.

You can associate a menubar with a child frame as usual, although an MDI child doesn’t display
its menubar under its own title bar. The MDI parent frame’s menubar will be changed to
reflect the currently active child frame. If there are currently no children, the parent
frame’s own menubar will be displayed.

## See also

MDIClientWindow, MDIParentFrame, Frame

## Methods

- MDIChildFrame.new
- MDIChildFrame#activate
- MDIChildFrame#create
- MDIChildFrame#maximize
- MDIChildFrame#restore

### MDIChildFrame.new

MDIChildFrame.new(%(arg-type)MDIParentFrame% parent, Integer id, String title, Point pos = DEFAULT_POSITION, Size size = DEFAULT_SIZE, Integer style = DEFAULT_FRAME_STYLE, String name = “frame”)

Constructor, creating the window.

#### Parameters

- parent The window parent. This should not be NULL.
- id The window identifier. It may take a value of -1 to indicate a default value.
- title The caption to be displayed on the frame’s title bar.
- pos The window position. A value of (-1, -1) indicates a default position, chosen by
  either the windowing system or Widgets, depending on platform.
- size The window size. A value of (-1, -1) indicates a default size, chosen by
  either the windowing system or Widgets, depending on platform.
- style The window style. See MDIChildFrame.
- name The name of the window. This parameter is used to associate a name with the item,
  allowing the application user to set Motif resource values for
  individual windows.

#### Remarks

None.

#### See also

MDIChildFrame#create

destructor()

Destructor. Destroys all child windows and menu bar if present.

### MDIChildFrame#activate

activate()

Activates this MDI child frame.

#### See also

MDIChildFrame#maximize, MDIChildFrame#restore

### MDIChildFrame#create

Boolean create(%(arg-type)Window% parent, Integer id, String title, Point pos = DEFAULT_POSITION, Size size = DEFAULT_SIZE, Integer style = DEFAULT_FRAME_STYLE, String name = “frame”)

Used in two-step frame construction. See MDIChildFrame.new for further details.

### MDIChildFrame#maximize

maximize(%(arg-type)Boolean% maximize)

Maximizes this MDI child frame.

#### See also

MDIChildFrame#activate, MDIChildFrame#restore

### MDIChildFrame#restore

restore()

Restores this MDI child frame (unmaximizes).

#### See also

MDIChildFrame#activate, MDIChildFrame#maximize

[This page automatically generated from the Textile source at 2023-06-09 00:45:25 +0000]