wxRuby Documentation Home

# Wx::WizardPage

WizardPage is one of the screens in Wizard: it must
know what are the following and preceding pages (which may be `NULL` for the
first/last page). Except for this extra knowledge, WizardPage is just a
panel, so the controls may be placed directly on it in the usual way.

This class allows the programmer to decide the order of pages in the wizard
dynamically (during run-time) and so provides maximal flexibility. Usually,
however, the order of pages is known in advance in which case
WizardPageSimple class is enough and it is simpler
to use.

## Virtual functions to override

To use this class, you must override get_prev
and get_next pure virtual functions (or you
may use WizardPageSimple instead).

get_bitmap can also be overridden, but this
should be very rarely needed.

## Derived from

Panel

Window

EvtHandler

Object

## See also

Wizard, Wizard sample

## Methods

- WizardPage.new
- WizardPage#get_prev
- WizardPage#get_next
- WizardPage#get_bitmap

### WizardPage.new

WizardPage.new(%(arg-type)Wizard% parent, Bitmap bitmap = NullBitmap, Char resource = nil)

Constructor accepts an optional bitmap which will be used for this page
instead of the default one for this wizard (note that all bitmaps used should
be of the same size). Notice that no other parameters are needed because the
wizard will resize and reposition the page anyhow.

#### Parameters

- parent The parent wizard
- bitmap The page-specific bitmap if different from the global one
- resource Load the page from the specified resource if non NULL

### WizardPage#get_prev

WizardPage get_prev()

Get the page which should be shown when the user chooses the `"Back"`
button: if `NULL` is returned, this button will be disabled. The first
page of the wizard will usually return `NULL` from here, but the others
will not.

#### See also

get_next

### WizardPage#get_next

WizardPage get_next()

Get the page which should be shown when the user chooses the `"Next"`
button: if `NULL` is returned, this button will be disabled. The last
page of the wizard will usually return `NULL` from here, but the others
will not.

#### See also

get_prev

### WizardPage#get_bitmap

Bitmap get_bitmap()

This method is called by Wizard to get the bitmap to display alongside the
page. By default, `m_bitmap` member variable which was set in the
constructor.

If the bitmap was not explicitly set (i.e. if `NullBitmap` is returned),
the default bitmap for the wizard should be used.

The only cases when you would want to override this function is if the page
bitmap depends dynamically on the user choices, i.e. almost never.

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