Version: 3.0.2
propgrid.h File Reference
#define wxPG_DEFAULT_STYLE   (0)
 Combines various styles.
 
#define wxPGMAN_DEFAULT_STYLE   (0)
 Combines various styles.
 
enum  wxPG_WINDOW_STYLES {
  wxPG_AUTO_SORT = 0x00000010,
  wxPG_HIDE_CATEGORIES = 0x00000020,
  wxPG_ALPHABETIC_MODE = (wxPG_HIDE_CATEGORIES|wxPG_AUTO_SORT),
  wxPG_BOLD_MODIFIED = 0x00000040,
  wxPG_SPLITTER_AUTO_CENTER = 0x00000080,
  wxPG_TOOLTIPS = 0x00000100,
  wxPG_HIDE_MARGIN = 0x00000200,
  wxPG_STATIC_SPLITTER = 0x00000400,
  wxPG_STATIC_LAYOUT = (wxPG_HIDE_MARGIN|wxPG_STATIC_SPLITTER),
  wxPG_LIMITED_EDITING = 0x00000800,
  wxPG_TOOLBAR = 0x00001000,
  wxPG_DESCRIPTION = 0x00002000,
  wxPG_NO_INTERNAL_BORDER = 0x00004000
}
 
enum  wxPG_EX_WINDOW_STYLES {
  wxPG_EX_INIT_NOCAT = 0x00001000,
  wxPG_EX_NO_FLAT_TOOLBAR = 0x00002000,
  wxPG_EX_MODE_BUTTONS = 0x00008000,
  wxPG_EX_HELP_AS_TOOLTIPS = 0x00010000,
  wxPG_EX_NATIVE_DOUBLE_BUFFERING = 0x00080000,
  wxPG_EX_AUTO_UNSPECIFIED_VALUES = 0x00200000,
  wxPG_EX_WRITEONLY_BUILTIN_ATTRIBUTES = 0x00400000,
  wxPG_EX_HIDE_PAGE_BUTTONS = 0x01000000,
  wxPG_EX_MULTIPLE_SELECTION = 0x02000000,
  wxPG_EX_ENABLE_TLP_TRACKING = 0x04000000,
  wxPG_EX_NO_TOOLBAR_DIVIDER = 0x04000000,
  wxPG_EX_TOOLBAR_SEPARATOR = 0x08000000
}
 Combines various styles. More...
 

Classes

class  wxPGValidationInfo
 wxPGValidationInfo 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...
 

Typedefs

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

Enumerations

enum  wxPG_VALIDATION_FAILURE_BEHAVIOR_FLAGS {
  wxPG_VFB_STAY_IN_PROPERTY = 0x01,
  wxPG_VFB_BEEP = 0x02,
  wxPG_VFB_MARK_CELL = 0x04,
  wxPG_VFB_SHOW_MESSAGE = 0x08,
  wxPG_VFB_SHOW_MESSAGEBOX = 0x10,
  wxPG_VFB_SHOW_MESSAGE_ON_STATUSBAR = 0x20,
  wxPG_VFB_DEFAULT
}
 
enum  wxPG_KEYBOARD_ACTIONS {
  wxPG_ACTION_INVALID = 0,
  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
}
 

Macro Definition Documentation

#define wxPG_DEFAULT_STYLE   (0)

Combines various styles.

#define wxPGMAN_DEFAULT_STYLE   (0)

Combines various styles.

Typedef Documentation

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:

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

Enumeration Type Documentation

Combines various styles.

Enumerator:
wxPG_EX_INIT_NOCAT 

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

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.

NOTE: 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 from 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).

Note that this option is global, and applies to all wxPG property containers.

wxPG_EX_HIDE_PAGE_BUTTONS 

Hides page selection buttons from 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 toolbar, on Windows.

wxPG_EX_TOOLBAR_SEPARATOR 

Show a separator below the toolbar.

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 

Cancel and undo any editing done in the currently active property editor.

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 

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.

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.