wxRuby Documentation Home

# Wx::PropertySheetDialog

This class represents a property sheet dialog: a tabbed dialog
for showing settings. It is optimized to show with flat tabs
on PocketPC devices.

To use this class, call PropertySheetDialog#create from your own
Create function. Then call create_buttons, and create pages, adding them to the book control.
Finally call layout_dialog.

For example:

bool MyPropertySheetDialog::Create(…) { if (!PropertySheetDialog::Create(…)) return false; CreateButtons(OK|CANCEL|HELP); // Add page Panel* panel = new Panel(GetBookCtrl(), …); GetBookCtrl()→AddPage(panel, T(“General”)); LayoutDialog(); return true; }

If necessary, override CreateBookCtrl and AddBookCtrl to create and add a different
kind of book control. You would then need to use two-step construction for the dialog.

## Derived from

Dialog

Window

EvtHandler

Object

## Methods

- PropertySheetDialog.new
- PropertySheetDialog#add_book_ctrl
- PropertySheetDialog#create
- PropertySheetDialog#create_book_ctrl
- PropertySheetDialog#create_buttons
- PropertySheetDialog#get_book_ctrl
- PropertySheetDialog#get_inner_sizer
- PropertySheetDialog#layout_dialog
- PropertySheetDialog#set_book_ctrl
- PropertySheetDialog#set_inner_sizer

### PropertySheetDialog.new

PropertySheetDialog.new(%(arg-type)Window% parent, Integer id, String title, Point pos = DEFAULT_POSITION, Size size = DEFAULT_SIZE, Integer style = DEFAULT_DIALOG_STYLE, String name = “dialogBox”)

Constructor.

### PropertySheetDialog#add_book_ctrl

add_book_ctrl(%(arg-type)Sizer% sizer)

Override this if you wish to add the book control in a way different from the
standard way (for example, using different spacing).

### PropertySheetDialog#create

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

Call this from your own Create function, before adding buttons and pages.

### PropertySheetDialog#create_book_ctrl

BookCtrlBase create_book_ctrl()

Override this if you wish to create a different kind of book control; by default, a Notebook
is created.

### PropertySheetDialog#create_buttons

create_buttons(%(arg-type)Integer% flags=OK|CANCEL)

Call this to create the buttons for the dialog. This calls Dialog#create_button_sizer, and
the flags are the same. On PocketPC, no buttons are created.

### PropertySheetDialog#get_book_ctrl

BookCtrlBase get_book_ctrl()

Returns the book control that will contain your settings pages.

### PropertySheetDialog#get_inner_sizer

Sizer get_inner_sizer()

Returns the inner sizer that contains the book control and button sizer.

### PropertySheetDialog#layout_dialog

layout_dialog()

Call this to lay out the dialog. On PocketPC, this does nothing, since the dialog will be shown
full-screen, and the layout will be done when the dialog receives a size event.

### PropertySheetDialog#set_book_ctrl

set_book_ctrl(%(arg-type)BookCtrlBase% bookCtrl)

Sets the book control used for the dialog. You will normally not need to use this.

### PropertySheetDialog#set_inner_sizer

set_inner_sizer(%(arg-type)Sizer% sizer)

Sets the inner sizer that contains the book control and button sizer. You will normally not need to use this.

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