| Version: 3.2.5

Classes | Macros | Typedefs | Variables
propgrid.h File Reference

#define | wxPG_DEFAULT_STYLE (0)
| Combines various styles. More...
#define | wxPGMAN_DEFAULT_STYLE (0)
| Combines various styles. More...
enum | wxPG_WINDOW_STYLES { wxPG_AUTO_SORT , wxPG_HIDE_CATEGORIES , wxPG_ALPHABETIC_MODE , wxPG_BOLD_MODIFIED , wxPG_SPLITTER_AUTO_CENTER , wxPG_TOOLTIPS , wxPG_HIDE_MARGIN , wxPG_STATIC_SPLITTER , wxPG_STATIC_LAYOUT , wxPG_LIMITED_EDITING , wxPG_TOOLBAR , wxPG_DESCRIPTION , wxPG_NO_INTERNAL_BORDER , wxPG_WINDOW_STYLE_MASK }

enum

wxPG_EX_WINDOW_STYLES {
wxPG_EX_INIT_NOCAT ,
wxPG_EX_NO_FLAT_TOOLBAR ,
wxPG_EX_MODE_BUTTONS ,
wxPG_EX_HELP_AS_TOOLTIPS ,
wxPG_EX_NATIVE_DOUBLE_BUFFERING ,
wxPG_EX_AUTO_UNSPECIFIED_VALUES ,
wxPG_EX_WRITEONLY_BUILTIN_ATTRIBUTES ,
wxPG_EX_HIDE_PAGE_BUTTONS ,
wxPG_EX_MULTIPLE_SELECTION ,
wxPG_EX_ENABLE_TLP_TRACKING ,
wxPG_EX_NO_TOOLBAR_DIVIDER ,
wxPG_EX_TOOLBAR_SEPARATOR ,
wxPG_EX_ALWAYS_ALLOW_FOCUS ,
wxPG_EX_WINDOW_PG_STYLE_MASK ,
wxPG_EX_WINDOW_PGMAN_STYLE_MASK ,
wxPG_EX_WINDOW_STYLE_MASK
}

| NOTE: wxPG_EX_xxx are extra window styles and must be set using SetExtraStyle() member function. More...

## Classes

class | wxPGValidationInfo
| Used to convey validation information to and from functions that actually perform validation. More...
class | wxPropertyGrid
| wxPropertyGrid is a specialized grid for editing properties - in other words name = value pairs. More...
class | wxPropertyGridEvent
| A property grid event holds information about events associated with wxPropertyGrid objects. More...
class | wxPropertyGridPopulator
| Allows populating wxPropertyGrid from arbitrary text source. More...

## Macros

#define | wxPGVFBFlags unsigned char
| Having this as define instead of wxByte typedef makes things easier for wxPython bindings (ignoring and redefining it in SWIG interface file seemed rather tricky) More...

## Typedefs

typedef int(* | wxPGSortCallback) (wxPropertyGrid *propGrid, wxPGProperty *p1, wxPGProperty *p2)
| This callback function is used for sorting properties. More...

## Enumerations

enum | wxPG_VALIDATION_FAILURE_BEHAVIOR_FLAGS { wxPG_VFB_STAY_IN_PROPERTY , wxPG_VFB_BEEP , wxPG_VFB_MARK_CELL , wxPG_VFB_SHOW_MESSAGE , wxPG_VFB_SHOW_MESSAGEBOX , wxPG_VFB_SHOW_MESSAGE_ON_STATUSBAR , wxPG_VFB_DEFAULT }
enum | wxPG_KEYBOARD_ACTIONS { wxPG_ACTION_INVALID , wxPG_ACTION_NEXT_PROPERTY , wxPG_ACTION_PREV_PROPERTY , wxPG_ACTION_EXPAND_PROPERTY , wxPG_ACTION_COLLAPSE_PROPERTY , wxPG_ACTION_CANCEL_EDIT , wxPG_ACTION_EDIT , wxPG_ACTION_PRESS_BUTTON , wxPG_ACTION_MAX }

## Variables

wxEventType | wxEVT_PG_SELECTED
wxEventType | wxEVT_PG_CHANGING
wxEventType | wxEVT_PG_CHANGED
wxEventType | wxEVT_PG_HIGHLIGHTED
wxEventType | wxEVT_PG_RIGHT_CLICK
wxEventType | wxEVT_PG_PAGE_CHANGED
wxEventType | wxEVT_PG_ITEM_COLLAPSED
wxEventType | wxEVT_PG_ITEM_EXPANDED
wxEventType | wxEVT_PG_DOUBLE_CLICK
wxEventType | wxEVT_PG_LABEL_EDIT_BEGIN
wxEventType | wxEVT_PG_LABEL_EDIT_ENDING
wxEventType | wxEVT_PG_COL_BEGIN_DRAG
wxEventType | wxEVT_PG_COL_DRAGGING
wxEventType | wxEVT_PG_COL_END_DRAG

## Macro Definition Documentation

## ◆ wxPG_DEFAULT_STYLE

#define wxPG_DEFAULT_STYLE (0)

Combines various styles.

## ◆ wxPGMAN_DEFAULT_STYLE

#define wxPGMAN_DEFAULT_STYLE (0)

Combines various styles.

## ◆ wxPGVFBFlags

#define wxPGVFBFlags unsigned char

Having this as define instead of wxByte typedef makes things easier for wxPython bindings (ignoring and redefining it in SWIG interface file seemed rather tricky)

## Typedef Documentation

## ◆ wxPGSortCallback

typedef int(* wxPGSortCallback) (wxPropertyGrid *propGrid, wxPGProperty *p1, wxPGProperty *p2)

This callback function is used for sorting properties.

Call wxPropertyGrid::SetSortFunction() to set it.

Sort function should return a value greater than 0 if position of p1 is after p2. So, for instance, when comparing property names, you can use following implementation:

    @code
        int MyPropertySortFunction(wxPropertyGrid* propGrid,
                                   wxPGProperty* p1,
                                   wxPGProperty* p2)
        {
            return p1->GetBaseName().compare( p2->GetBaseName() );
        }
    @endcode

## Enumeration Type Documentation

## ◆ wxPG_EX_WINDOW_STYLES

enum wxPG_EX_WINDOW_STYLES

NOTE: wxPG_EX_xxx are extra window styles and must be set using SetExtraStyle() member function.

Enumerator

wxPG_EX_INIT_NOCAT

Speeds up switching to wxPG_HIDE_CATEGORIES mode.

Initially, if wxPG_HIDE_CATEGORIES is not defined, the non-categorized data storage is not activated, and switching the mode first time becomes somewhat slower. wxPG_EX_INIT_NOCAT activates the non-categorized data storage right away.

Remarks
  If you do plan not switching to non-categoric mode, or if you don't plan to use categories at all, then using this style will result in waste of resources.

wxPG_EX_NO_FLAT_TOOLBAR | Extended window style that sets wxPropertyGridManager tool bar to not use flat style.
wxPG_EX_MODE_BUTTONS | Shows alphabetic/categoric mode buttons on wxPropertyGridManager tool bar.
wxPG_EX_HELP_AS_TOOLTIPS | Show property help strings as tool tips instead as text on the status bar. You can set the help strings using SetPropertyHelpString member function.
wxPG_EX_NATIVE_DOUBLE_BUFFERING | Allows relying on native double-buffering.
wxPG_EX_AUTO_UNSPECIFIED_VALUES | Set this style to let user have ability to set values of properties to unspecified state. Same as setting wxPG_PROP_AUTO_UNSPECIFIED for all properties.

wxPG_EX_WRITEONLY_BUILTIN_ATTRIBUTES

If this style is used, built-in attributes (such as wxPG_FLOAT_PRECISION and wxPG_STRING_PASSWORD) are not stored into property's attribute storage (thus they are not readable).

Remarks
  This option is global, and applies to all wxPG property containers.

wxPG_EX_HIDE_PAGE_BUTTONS | Hides page selection buttons from wxPropertyGridManager tool bar.

wxPG_EX_MULTIPLE_SELECTION

Allows multiple properties to be selected by user (by pressing SHIFT when clicking on a property, or by dragging with left mouse button down).

You can get array of selected properties with wxPropertyGridInterface::GetSelectedProperties(). In multiple selection mode wxPropertyGridInterface::GetSelection() returns property which has editor active (usually the first one selected). Other useful member functions are ClearSelection(), AddToSelection() and RemoveFromSelection().

wxPG_EX_ENABLE_TLP_TRACKING

This enables top-level window tracking which allows wxPropertyGrid to notify the application of last-minute property value changes by user.

This style is not enabled by default because it may cause crashes when wxPropertyGrid is used in with wxAUI or similar system.

Remarks
  If you are not in fact using any system that may change wxPropertyGrid's top-level parent window on its own, then you are recommended to enable this style.

wxPG_EX_NO_TOOLBAR_DIVIDER | Don't show divider above wxPropertyGridManager toolbar (wxMSW only).
wxPG_EX_TOOLBAR_SEPARATOR | Show a separator below the wxPropertyGridManager toolbar.
wxPG_EX_ALWAYS_ALLOW_FOCUS | Allows taking focus on the entire area (on canvas) even if wxPropertyGrid is not a standalone control.
wxPG_EX_WINDOW_PG_STYLE_MASK | A mask which can be used to filter (out) all extra styles applicable to wxPropertyGrid.
wxPG_EX_WINDOW_PGMAN_STYLE_MASK | A mask which can be used to filter (out) all extra styles applicable to wxPropertyGridManager.
wxPG_EX_WINDOW_STYLE_MASK | A mask which can be used to filter (out) all extra styles.

## ◆ wxPG_KEYBOARD_ACTIONS

enum wxPG_KEYBOARD_ACTIONS

# wxPropertyGrid Action Identifiers

These are used with wxPropertyGrid::AddActionTrigger() and wxPropertyGrid::ClearActionTriggers().

Enumerator
wxPG_ACTION_INVALID |
wxPG_ACTION_NEXT_PROPERTY | Select the next property.
wxPG_ACTION_PREV_PROPERTY | Select the previous property.
wxPG_ACTION_EXPAND_PROPERTY | Expand the selected property, if it has child items.
wxPG_ACTION_COLLAPSE_PROPERTY | Collapse the selected property, if it has child items.
wxPG_ACTION_CANCEL_EDIT |
wxPG_ACTION_EDIT | Move focus to the editor control of the currently selected property.
wxPG_ACTION_PRESS_BUTTON | Causes editor's button (if any) to be pressed.
wxPG_ACTION_MAX |

## ◆ wxPG_VALIDATION_FAILURE_BEHAVIOR_FLAGS

enum wxPG_VALIDATION_FAILURE_BEHAVIOR_FLAGS

# wxPropertyGrid Validation Failure behaviour Flags

Enumerator
wxPG_VFB_STAY_IN_PROPERTY | Prevents user from leaving property unless value is valid. If this behaviour flag is not used, then value change is instead cancelled.
wxPG_VFB_BEEP | Calls wxBell() on validation failure.
wxPG_VFB_MARK_CELL | Cell with invalid value will be marked (with red colour).
wxPG_VFB_SHOW_MESSAGE | Display a text message explaining the situation. To customize the way the message is displayed, you need to reimplement wxPropertyGrid::DoShowPropertyError() in a derived class. Default behaviour is to display the text on the top-level frame's status bar, if present, and otherwise using wxMessageBox.
wxPG_VFB_SHOW_MESSAGEBOX | Similar to wxPG_VFB_SHOW_MESSAGE, except always displays the message using wxMessageBox.
wxPG_VFB_SHOW_MESSAGE_ON_STATUSBAR | Similar to wxPG_VFB_SHOW_MESSAGE, except always displays the message on the status bar (when present - you can reimplement wxPropertyGrid::GetStatusBar() in a derived class to specify this yourself).
wxPG_VFB_DEFAULT | Defaults.

## ◆ wxPG_WINDOW_STYLES

enum wxPG_WINDOW_STYLES

# wxPropertyGrid Window Styles

SetWindowStyleFlag method can be used to modify some of these at run-time.

Enumerator
wxPG_AUTO_SORT | This will cause Sort() automatically after an item is added. When inserting a lot of items in this mode, it may make sense to use Freeze() before operations and Thaw() afterwards to increase performance.
wxPG_HIDE_CATEGORIES | Categories are not initially shown (even if added). IMPORTANT NOTE: If you do not plan to use categories, then this style will waste resources. This flag can also be changed using wxPropertyGrid::EnableCategories method.
wxPG_ALPHABETIC_MODE | This style combines non-categoric mode and automatic sorting.
wxPG_BOLD_MODIFIED | Modified values are shown in bold font. Changing this requires Refresh() to show changes.
wxPG_SPLITTER_AUTO_CENTER | When wxPropertyGrid is resized, splitter moves to the center. This behaviour stops once the user manually moves the splitter.
wxPG_TOOLTIPS | Display tool tips for cell text that cannot be shown completely. If wxUSE_TOOLTIPS is 0, then this doesn't have any effect.
wxPG_HIDE_MARGIN | Disables margin and hides all expand/collapse buttons that would appear outside the margin (for sub-properties). Toggling this style automatically expands all collapsed items.
wxPG_STATIC_SPLITTER | This style prevents user from moving the splitter.
wxPG_STATIC_LAYOUT | Combination of other styles that make it impossible for user to modify the layout.
wxPG_LIMITED_EDITING | Disables wxTextCtrl based editors for properties which can be edited in another way. Equals calling wxPropertyGrid::LimitPropertyEditing() for all added properties.
wxPG_TOOLBAR | wxPropertyGridManager only: Show tool bar for mode and page selection.
wxPG_DESCRIPTION | wxPropertyGridManager only: Show adjustable text box showing description or help text, if available, for currently selected property.
wxPG_NO_INTERNAL_BORDER | wxPropertyGridManager only: don't show an internal border around the property grid. Recommended if you use a header.
wxPG_WINDOW_STYLE_MASK | A mask which can be used to filter (out) all styles.

## Variable Documentation

## ◆ wxEVT_PG_CHANGED

wxEventType wxEVT_PG_CHANGED

## ◆ wxEVT_PG_CHANGING

wxEventType wxEVT_PG_CHANGING

## ◆ wxEVT_PG_COL_BEGIN_DRAG

wxEventType wxEVT_PG_COL_BEGIN_DRAG

## ◆ wxEVT_PG_COL_DRAGGING

wxEventType wxEVT_PG_COL_DRAGGING

## ◆ wxEVT_PG_COL_END_DRAG

wxEventType wxEVT_PG_COL_END_DRAG

## ◆ wxEVT_PG_DOUBLE_CLICK

wxEventType wxEVT_PG_DOUBLE_CLICK

## ◆ wxEVT_PG_HIGHLIGHTED

wxEventType wxEVT_PG_HIGHLIGHTED

## ◆ wxEVT_PG_ITEM_COLLAPSED

wxEventType wxEVT_PG_ITEM_COLLAPSED

## ◆ wxEVT_PG_ITEM_EXPANDED

wxEventType wxEVT_PG_ITEM_EXPANDED

## ◆ wxEVT_PG_LABEL_EDIT_BEGIN

wxEventType wxEVT_PG_LABEL_EDIT_BEGIN

## ◆ wxEVT_PG_LABEL_EDIT_ENDING

wxEventType wxEVT_PG_LABEL_EDIT_ENDING

## ◆ wxEVT_PG_PAGE_CHANGED

wxEventType wxEVT_PG_PAGE_CHANGED

## ◆ wxEVT_PG_RIGHT_CLICK

wxEventType wxEVT_PG_RIGHT_CLICK

## ◆ wxEVT_PG_SELECTED

wxEventType wxEVT_PG_SELECTED