wxPropertyGrid Class Reference

wxPropertyGrid is a specialized two-column grid for editing properties such as strings, numbers, flagsets, fonts, and colours. wxPropertySheet used to do the very same thing, but it hasn't been updated for a while and it is currently deprecated. More...

#include <propgrid.h>

Inheritance diagram for wxPropertyGrid:

wxPropertyContainerMethods List of all members.

[NOHEADER]

void EditorsValueWasModified ()
void EditorsValueWasNotModified ()
void FixPosForTextCtrl (wxWindow *ctrl)
wxWindow * GenerateEditorButton (const wxPoint &pos, const wxSize &sz)
wxWindow * GenerateEditorTextCtrl (const wxPoint &pos, const wxSize &sz, const wxString &value, wxWindow *secondary, int extraStyle=0, int maxLen=0)
wxWindow * GenerateEditorTextCtrlAndButton (const wxPoint &pos, const wxSize &sz, wxWindow **psecondary, int limited_editing, wxPGProperty *property)
wxWindow * GetEditorControl () const
wxWindow * GetEditorControlSecondary () const
wxPoint GetGoodEditorDialogPosition (wxPGProperty *p, const wxSize &sz)
wxWindow * GetPrimaryEditor () const
wxRect GetPropertyRect (const wxPGProperty *p1, const wxPGProperty *p2) const
void IgnoredEventPasses ()
void IgnoreNextEvent ()
bool IsEditorsValueModified () const
int IsNextEventIgnored () const
void OnCustomEditorEvent (wxCommandEvent &event)
void SLAlloc (unsigned int itemcount, const wxChar **items)
wxArrayString & SLGet ()
void ArrayStringToString (wxString &dst, const wxArrayString &src, wxChar preDelim, wxChar postDelim, int flags)
wxString & CreateEscapeSequences (wxString &dst_str, wxString &src_str)
wxString & ExpandEscapeSequences (wxString &dst_str, wxString &src_str)

Public Member Functions

void AddPropertyChoice (const wxString &name, const wxString &label, int value=INT_MAX)
void AddPropertyChoice (wxPGId id, const wxString &label, int value=INT_MAX)
wxPGId Append (const wxString &label, const wxString &name=(*((wxString *) NULL)), bool value=false)
wxPGId Append (const wxString &label, const wxString &name=(*((wxString *) NULL)), double value=0.0)
wxPGId Append (const wxString &label, const wxString &name=(*((wxString *) NULL)), int value=0)
wxPGId Append (const wxString &label, const wxString &name=(*((wxString *) NULL)), const wxString &value=wxEmptyString)
wxPGId Append (wxPGProperty *property)
wxPGId AppendCategory (const wxString &label, const wxString &name=(*((wxString *) NULL)))
wxPGId AppendIn (const wxString &name, const wxString &label, const wxString &propname, wxVariant &value)
wxPGId AppendIn (wxPGId id, const wxString &label, const wxString &propname, wxVariant &value)
wxPGId AppendIn (const wxString &name, wxPGProperty *property)
wxPGId AppendIn (wxPGId id, wxPGProperty *property)
void BeginAddChildren (const wxString &name)
void BeginAddChildren (wxPGId id)
bool CanClose ()
void CenterSplitter (bool enable_auto_centering=false)
void Clear ()
void ClearInternalFlag (long flag)
void ClearModifiedStatus ()
void ClearModifiedStatus (wxPGId id)
bool ClearPropertyValue (const wxString &name)
bool ClearPropertyValue (wxPGId id)
bool ClearSelection ()
void ClearTargetPage ()
bool Collapse (const wxString &name)
bool Collapse (wxPGId id)
bool CollapseAll ()
bool Compact (bool compact)
bool Create (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=(0), const wxChar *name=wxPropertyGridNameStr)
void DecFrozen ()
void Delete (const wxString &name)
void Delete (wxPGId id)
void DeletePropertyChoice (const wxString &name, int index)
void DeletePropertyChoice (wxPGId id, int index)
bool Disable (const wxString &name)
bool Disable (wxPGId id)
bool DisableProperty (const wxString &name)
bool DisableProperty (wxPGId id)
bool EditorValidate ()
bool EnableCategories (bool enable)
bool EnableProperty (const wxString &name, bool enable=true)
bool EnableProperty (wxPGId id, bool enable=true)
void EndAddChildren (const wxString &name)
void EndAddChildren (wxPGId id)
bool EnsureVisible (const wxString &name)
bool EnsureVisible (wxPGId id)
bool Expand (const wxString &name)
bool Expand (wxPGId id)
void ExpandAll ()
unsigned int GetBottomY () const
wxColour GetCaptionBackgroundColour () const
wxFont & GetCaptionFont ()
wxColour GetCaptionForegroundColour () const
wxColour GetCellBackgroundColour () const
wxColour GetCellDisabledTextColour () const
wxColour GetCellTextColour () const
size_t GetChildrenCount (const wxString &name)
size_t GetChildrenCount (wxPGId id) const
size_t GetChildrenCount ()
wxPGId GetFirst () const
wxPGId GetFirstCategory () const
wxPGId GetFirstChild (const wxString &name)
wxPGId GetFirstChild (wxPGId id)
wxPGId GetFirstProperty ()
wxPGId GetFirstVisible () const
int GetFontHeight () const
wxPropertyGridGetGrid ()
wxSize GetImageSize (wxPGId id=wxPGId((wxPGProperty *) NULL)) const
long GetInternalFlags () const
wxPGId GetItemAtY (int y)
wxPGId GetLastChild (const wxString &name)
wxPGId GetLastChild (wxPGId id)
wxPGId GetLastProperty ()
wxPGId GetLastVisible ()
wxColour GetLineColour () const
wxColour GetMarginColour () const
wxPGId GetNextCategory (wxPGId id) const
wxPGId GetNextProperty (wxPGId id)
wxPGId GetNextSibling (const wxString &name)
wxPGId GetNextSibling (wxPGId id)
wxPGId GetNextVisible (wxPGId property) const
wxPGId GetPrevProperty (wxPGId id)
wxPGId GetPrevSibling (const wxString &name)
wxPGId GetPrevSibling (wxPGId id)
wxPGId GetPrevVisible (wxPGId id)
wxString GetPropertyAttributes (wxPGId id, unsigned int flagmask=0xFFFF) const
wxColour GetPropertyBackgroundColour (const wxString &name) const
wxColour GetPropertyBackgroundColour (wxPGId id) const
wxPGId GetPropertyByLabel (const wxString &name) const
wxPGId GetPropertyByName (const wxString &name, const wxString &subname) const
wxPGId GetPropertyByName (const wxString &name) const
wxPGId GetPropertyByNameA (const wxString &name) const
wxPGId GetPropertyCategory (const wxString &name) const
wxPGId GetPropertyCategory (wxPGId id) const
wxPGChoicesGetPropertyChoices (const wxString &name)
wxPGChoicesGetPropertyChoices (wxPGId id)
const wxChar * GetPropertyClassName (const wxString &name) const
const wxChar * GetPropertyClassName (wxPGId id) const
wxPGProperty::ClientDataType GetPropertyClientData (const wxString &name) const
wxPGProperty::ClientDataType GetPropertyClientData (wxPGId id) const
wxColour GetPropertyColour (const wxString &name) const
wxColour GetPropertyColour (wxPGId id) const
const wxPGEditorGetPropertyEditor (const wxString &name) const
const wxPGEditorGetPropertyEditor (wxPGId id) const
wxString GetPropertyHelpString (const wxString &name) const
wxString GetPropertyHelpString (wxPGId id) const
wxBitmap * GetPropertyImage (const wxString &name) const
wxBitmap * GetPropertyImage (wxPGId id) const
unsigned int GetPropertyIndex (const wxString &name)
unsigned int GetPropertyIndex (wxPGId id)
const wxString & GetPropertyLabel (const wxString &name)
const wxString & GetPropertyLabel (wxPGId id)
const wxString & GetPropertyName (wxPGId id)
wxPGId GetPropertyParent (const wxString &name)
wxPGId GetPropertyParent (wxPGId id)
int GetPropertyPriority (const wxString &name)
int GetPropertyPriority (wxPGId id)
wxPGPropertyGetPropertyPtr (const wxString &name) const
wxPGPropertyGetPropertyPtr (wxPGId id) const
wxColour GetPropertyTextColour (const wxString &name) const
wxColour GetPropertyTextColour (wxPGId id) const
wxValidator * GetPropertyValidator (const wxString &name)
wxValidator * GetPropertyValidator (wxPGId id)
wxVariant GetPropertyValue (const wxString &name)
wxVariant GetPropertyValue (wxPGId id)
const wxArrayInt & GetPropertyValueAsArrayInt (const wxString &name) const
const wxArrayString & GetPropertyValueAsArrayString (const wxString &name) const
bool GetPropertyValueAsBool (const wxString &name) const
wxDateTime GetPropertyValueAsDateTime (const wxString &name) const
double GetPropertyValueAsDouble (const wxString &name) const
int GetPropertyValueAsInt (const wxString &name) const
long GetPropertyValueAsLong (const wxString &name) const
const wxPoint & GetPropertyValueAsPoint (const wxString &name) const
const wxSize & GetPropertyValueAsSize (const wxString &name) const
wxString GetPropertyValueAsString (const wxString &name) const
const wxObject * GetPropertyValueAsWxObjectPtr (const wxString &name) const
wxVariant GetPropertyValues (const wxString &listname=wxEmptyString, wxPGId baseparent=wxPGId((wxPGProperty *) NULL), long flags=0) const
const wxPGValueTypeGetPropertyValueType (const wxString &name)
const wxPGValueTypeGetPropertyValueType (wxPGId id)
size_t GetPVTI (const wxString &name)
size_t GetPVTI (wxPGId id)
wxString GetPVTN (const wxString &name)
wxString GetPVTN (wxPGId id)
wxPGId GetRoot () const
int GetRowHeight () const
wxPGId GetSelectedProperty () const
wxPGId GetSelection () const
wxColour GetSelectionBackgroundColour () const
wxColour GetSelectionForegroundColour () const
int GetSplitterPosition () const
wxPropertyGridStateGetState () const
int GetVerticalSpacing () const
bool HasSelection () const
void HideLowPriority ()
bool HideProperty (const wxString &name)
bool HideProperty (wxPGId id, bool hide=true)
void IncFrozen ()
wxPGId Insert (wxPGId id, int index, const wxString &label, const wxString &name, bool value)
wxPGId Insert (wxPGId id, int index, const wxString &label, const wxString &name, double value)
wxPGId Insert (wxPGId id, int index, const wxString &label, const wxString &name, int value)
wxPGId Insert (wxPGId id, int index, const wxString &label, const wxString &name, const wxString &value=wxEmptyString)
wxPGId Insert (const wxString &name, int index, wxPGProperty *newproperty)
wxPGId Insert (wxPGId id, int index, wxPGProperty *newproperty)
wxPGId Insert (const wxString &name, wxPGProperty *newproperty)
wxPGId Insert (wxPGId priorthis, wxPGProperty *newproperty)
wxPGId InsertCategory (wxPGId id, int index, const wxString &label, const wxString &name=(*((wxString *) NULL)))
void InsertPropertyChoice (const wxString &name, const wxString &label, int index, int value=INT_MAX)
void InsertPropertyChoice (wxPGId id, const wxString &label, int index, int value=INT_MAX)
bool IsAnyModified () const
bool IsFrozen () const
bool IsModified (const wxString &name)
bool IsModified (wxPGId id) const
bool IsPropertyCategory (const wxString &name)
bool IsPropertyCategory (wxPGId id) const
bool IsPropertyEnabled (const wxString &name)
bool IsPropertyEnabled (wxPGId id) const
bool IsPropertyExpanded (const wxString &name)
bool IsPropertyKindOf (const wxString &name, wxPGPropertyClassInfo &info)
bool IsPropertyModified (const wxString &name)
bool IsPropertyModified (wxPGId id) const
bool IsPropertySelected (const wxString &name)
bool IsPropertySelected (wxPGId id) const
bool IsPropertyShown (const wxString &name)
bool IsPropertyShown (wxPGId id) const
bool IsPropertyUnspecified (const wxString &name)
bool IsPropertyUnspecified (wxPGId id) const
bool IsPropertyValueType (const wxString &name, const wxClassInfo *classinfo)
bool IsPropertyValueType (const wxString &name, const wxPGValueType *valuetype)
bool IsPropertyValueType (const wxString &name, const wxChar *typestr)
bool IsPropertyValueType (wxPGId id, const wxClassInfo *classinfo)
bool IsPropertyValueType (wxPGId id, const wxPGValueType *valuetype)
bool IsPropertyValueType (wxPGId id, const wxChar *typestr)
void LimitPropertyEditing (const wxString &name, bool limit=true)
void LimitPropertyEditing (wxPGId id, bool limit=true)
void OnComboItemPaint (wxPGCustomComboControl *pCb, int item, wxDC &dc, wxRect &rect, int flags)
void PropertyWasModified (wxPGProperty *p, int selFlags=0)
wxPGId ReplaceProperty (const wxString &name, wxPGProperty *property)
wxPGId ReplaceProperty (wxPGId id, wxPGProperty *property)
void ResetColours ()
void ResetDefaultPriority ()
bool SelectProperty (const wxString &name, bool focus=false)
bool SelectProperty (wxPGId id, bool focus=false)
void SendNavigationKeyEvent (int dir)
void SetBottomY (unsigned int y)
void SetButtonShortcut (int keycode, bool ctrlDown=false, bool altDown=false)
void SetCaptionBackgroundColour (const wxColour &col)
void SetCaptionForegroundColour (const wxColour &col)
void SetCaptionTextColour (const wxString &name, const wxColour &col)
void SetCaptionTextColour (wxPGId id, const wxColour &col)
void SetCellBackgroundColour (const wxColour &col)
void SetCellDisabledTextColour (const wxColour &col)
void SetCellTextColour (const wxColour &col)
void SetCurrentCategory (const wxString &name=wxEmptyString)
void SetCurrentCategory (wxPGId id)
void SetDefaultPriority (int priority)
void SetLineColour (const wxColour &col)
void SetMarginColour (const wxColour &col)
void SetPropertyAttribute (const wxString &name, int attrid, wxVariant value, long argFlags=0)
void SetPropertyAttribute (wxPGId id, int attrid, wxVariant value, long argFlags=0)
void SetPropertyAttributeAll (int attrid, wxVariant value)
void SetPropertyAttributes (const wxString &name, const wxString &attributes) const
void SetPropertyBackgroundColour (const wxString &name, const wxColour &col)
void SetPropertyBackgroundColour (wxPGId id, const wxColour &col)
void SetPropertyChoices (const wxString &name, wxPGChoices &choices)
void SetPropertyChoicesExclusive (const wxString &name)
void SetPropertyChoicesExclusive (wxPGId id)
void SetPropertyClientData (const wxString &name, wxPGProperty::ClientDataType clientData)
void SetPropertyClientData (wxPGId id, wxPGProperty::ClientDataType clientData)
void SetPropertyColour (const wxString &name, const wxColour &col)
void SetPropertyColour (wxPGId id, const wxColour &col)
void SetPropertyColourToDefault (const wxString &name)
void SetPropertyColourToDefault (wxPGId id)
void SetPropertyEditor (const wxString &name, const wxString &editorName)
void SetPropertyEditor (wxPGId id, const wxString &editorName)
void SetPropertyEditor (const wxString &name, const wxPGEditor *editor)
void SetPropertyEditor (wxPGId id, const wxPGEditor *editor)
void SetPropertyHelpString (const wxString &name, const wxString &helpString)
void SetPropertyHelpString (wxPGId id, const wxString &helpString)
void SetPropertyImage (const wxString &name, wxBitmap &bmp)
void SetPropertyImage (wxPGId id, wxBitmap &bmp)
void SetPropertyLabel (const wxString &name, const wxString &newproplabel)
void SetPropertyLabel (wxPGId id, const wxString &newproplabel)
bool SetPropertyMaxLength (const wxString &name, int maxLen)
bool SetPropertyMaxLength (wxPGId id, int maxLen)
void SetPropertyName (const wxString &name, const wxString &newname)
void SetPropertyName (wxPGId id, const wxString &newname)
bool SetPropertyPriority (const wxString &name, int priority)
bool SetPropertyPriority (wxPGId id, int priority)
void SetPropertyReadOnly (const wxString &name, bool readOnly=true)
void SetPropertyReadOnly (wxPGId id, bool readOnly=true)
void SetPropertyTextColour (const wxString &name, const wxColour &col)
void SetPropertyTextColour (wxPGId id, const wxColour &col)
void SetPropertyUnspecified (const wxString &name)
void SetPropertyUnspecified (wxPGId id)
void SetPropertyValidator (const wxString &name, const wxValidator &validator)
void SetPropertyValidator (wxPGId id, const wxValidator &validator)
void SetPropertyValue (const wxString &name, const wxULongLong &value)
void SetPropertyValue (const wxString &name, const wxLongLong &value)
void SetPropertyValue (const wxString &name, const wxSize &value)
void SetPropertyValue (const wxString &name, const wxPoint &value)
void SetPropertyValue (const wxString &name, const wxDateTime &value)
void SetPropertyValue (const wxString &name, const wxArrayInt &value)
void SetPropertyValue (const wxString &name, const wxArrayString &value)
void SetPropertyValue (const wxString &name, wxVariant &value)
void SetPropertyValue (const wxString &name, wxObject &value)
void SetPropertyValue (const wxString &name, wxObject *value)
void SetPropertyValue (const wxString &name, void *value)
void SetPropertyValue (const wxString &name, const wxChar *value)
void SetPropertyValue (const wxString &name, const wxString &value)
void SetPropertyValue (const wxString &name, bool value)
void SetPropertyValue (const wxString &name, double value)
void SetPropertyValue (const wxString &name, int value)
void SetPropertyValue (const wxString &name, long value)
void SetPropertyValue (wxPGId id, const wxDateTime &value)
void SetPropertyValue (wxPGId id, const wxArrayInt &value)
void SetPropertyValue (wxPGId id, const wxULongLong &value)
void SetPropertyValue (wxPGId id, const wxLongLong &value)
void SetPropertyValue (wxPGId id, const wxSize &value)
void SetPropertyValue (wxPGId id, const wxPoint &value)
void SetPropertyValue (wxPGId id, wxVariant &value)
void SetPropertyValue (wxPGId id, wxObject &value)
void SetPropertyValue (wxPGId id, void *value)
void SetPropertyValue (wxPGId id, wxObject *value)
void SetPropertyValue (wxPGId id, const wxArrayString &value)
void SetPropertyValue (wxPGId id, const wxChar *value)
void SetPropertyValue (wxPGId id, const wxString &value)
void SetPropertyValue (wxPGId id, bool value)
void SetPropertyValue (wxPGId id, double value)
void SetPropertyValue (wxPGId id, int value)
void SetPropertyValue (wxPGId id, long value)
void SetPropertyValues (const wxVariant &list, const wxString &default_category=wxEmptyString)
void SetPropertyValues (const wxVariantList &list, const wxString &default_category=wxEmptyString)
void SetPropertyValues (const wxVariant &list, wxPGId default_category)
void SetPropertyValues (const wxVariantList &list, wxPGId default_category)
void SetSelectionBackground (const wxColour &col)
void SetSelectionForeground (const wxColour &col)
void SetSplitterLeft (bool subProps=false)
void SetSplitterPosition (int newxpos, bool refresh=true)
void SetVerticalSpacing (int vspacing)
virtual void SetWindowStyleFlag (long style)
void ShowLowPriority ()
void ShowPropertyError (const wxString &name, const wxString &msg)
void ShowPropertyError (wxPGId id, const wxString &msg)
void Sort (const wxString &name)
void Sort (wxPGId id)
void Sort ()
void SwitchState (wxPropertyGridState *pNewState)
void TogglePropertyPriority (const wxString &name)
void TogglePropertyPriority (wxPGId id)
 wxPropertyGrid (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=(0), const wxChar *name=wxPropertyGridNameStr)
 wxPropertyGrid ()
virtual ~wxPropertyGrid ()

Static Public Member Functions

void AutoGetTranslation (bool enable)
wxPGPropertyCreatePropertyByClass (const wxString &classname, const wxString &label, const wxString &name)
wxPGPropertyCreatePropertyByType (const wxString &valuetype, const wxString &label, const wxString &name)
void DoubleToString (wxString &target, double value, int precision, bool removeZeroes, wxString *precTemplate)
wxPGEditorGetEditorByName (const wxString &editorName)
wxString GetPropertyShortClassName (wxPGId id)
const wxArrayInt & GetPropertyValueAsArrayInt (wxPGId id)
const wxArrayString & GetPropertyValueAsArrayString (wxPGId id)
bool GetPropertyValueAsBool (wxPGId id)
wxDateTime GetPropertyValueAsDateTime (wxPGId id)
double GetPropertyValueAsDouble (wxPGId id)
int GetPropertyValueAsInt (wxPGId id)
long GetPropertyValueAsLong (wxPGId id)
const wxLongLong & GetPropertyValueAsLongLong (wxPGId id)
const wxPoint & GetPropertyValueAsPoint (wxPGId id)
const wxSize & GetPropertyValueAsSize (wxPGId id)
wxString GetPropertyValueAsString (wxPGId id)
const wxULongLong & GetPropertyValueAsULongLong (wxPGId id)
void * GetPropertyValueAsVoidPtr (wxPGId id)
const wxObject * GetPropertyValueAsWxObjectPtr (wxPGId id)
wxPGValueTypeGetValueType (const wxString &type)
void InitAllTypeHandlers ()
bool IsPropertyExpanded (wxPGId id)
bool IsPropertyKindOf (wxPGId id, wxPGPropertyClassInfo &info)
void RegisterAdditionalEditors ()
void RegisterAdvancedPropertyClasses ()
wxPGEditorRegisterEditorClass (wxPGEditor *editor, const wxString &name, bool noDefCheck=false)
bool RegisterPropertyClass (const wxChar *name, wxPGPropertyClassInfo *classinfo)
wxPGValueTypeRegisterValueType (wxPGValueType *valueclass, bool noDefCheck=false, const wxString &className=wxEmptyString)
void SetBoolChoices (const wxChar *true_choice, const wxChar *false_choice)
void SetPropertyAttributes (wxPGId id, const wxString &attributes)
void SetPropertyChoices (wxPGId id, wxPGChoices &choices)

Protected Member Functions

virtual wxPropertyGridStateCreateState () const
virtual wxPGId DoGetPropertyByName (const wxString &name) const
virtual void RefreshProperty (wxPGProperty *p)=0

Static Protected Member Functions

void DoSetPropertyAttribute (wxPGId id, int attrid, wxVariant &value, long argFlags)

Protected Attributes

wxString m_emptyString
wxPropertyGridStatem_pState

Detailed Description

wxPropertyGrid is a specialized two-column grid for editing properties such as strings, numbers, flagsets, fonts, and colours. wxPropertySheet used to do the very same thing, but it hasn't been updated for a while and it is currently deprecated.

wxPropertyGrid is modeled after .NET propertygrid (hence the name), and thus features are similar. However, inorder to keep the widget lightweight, it does not (and will not) have toolbar for mode and page selection, nor the help text box. wxAdvancedPropertyGrid (or something similarly named) is planned to have these features in some distant future.

Derived from

wxPropertyContainerMethods
wxScrolledWindow
wxPanel
wxWindow
wxEvtHandler
wxObject

Include files

<wx/propertygrid/propertygrid.h>

Window styles

Additional Window Styles

Event handling

To process input from a propertygrid control, use these event handler macros to direct input to member functions that take a wxPropertyGridEvent argument.

EVT_PG_SELECTED (id, func)Property is selected.
EVT_PG_CHANGED (id, func)Property value is modified.
EVT_PG_HIGHLIGHTED (id, func)Mouse moves over property. Event's property is NULL if hovered on area that is not a property.
EVT_PG_RIGHT_CLICK (id, func)Mouse right-clicked on a property.
EVT_PG_DOUBLE_CLICK (id, func)Mouse double-clicked on a property.
EVT_PG_ITEM_COLLAPSED (id, func)User collapses a property or category.
EVT_PG_ITEM_EXPANDED (id, func)User expands a property or category.
EVT_BUTTON (id, func)Button in a property editor was clicked. Only occurs if the property doesn't handle button clicks itself.
EVT_TEXT (id, func)wxTextCtrl based editor was updated (but property value was not yet modified)

See also:
wxPropertyGridEvent
Remarks:

For code examples, see the main page.


Constructor & Destructor Documentation

wxPropertyGrid::wxPropertyGrid  ) 
 

Two step constructor.

Call Create when this constructor is called to build up the wxPropertyGrid

wxPropertyGrid::wxPropertyGrid wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = (0),
const wxChar *  name = wxPropertyGridNameStr
 

The default constructor.

The styles to be used are styles valid for the wxWindow and wxScrolledWindow.

See also:
Additional Window Styles

virtual wxPropertyGrid::~wxPropertyGrid  )  [virtual]
 

Destructor.


Member Function Documentation

void wxPropertyContainerMethods::AddPropertyChoice wxPGId  id,
const wxString &  label,
int  value = INT_MAX
[inherited]
 

Adds choice to a property that can accept one.

Remarks:
  • If you need to make sure that you modify only the set of choices of a single property (and not also choices of other properties with initially identical set), call wxPropertyGrid::SetPropertyChoicesPrivate.
  • This usually only works for wxEnumProperty and derivatives (wxFlagsProperty can get accept new items but its items may not get updated).

wxPGId wxPropertyGrid::Append wxPGProperty property  ) 
 

Appends property to the list.

wxPropertyGrid assumes ownership of the object. Becomes child of most recently added category.

Remarks:
  • wxPropertyGrid takes the ownership of the property pointer.
  • If appending a category with name identical to a category already in the wxPropertyGrid, then newly created category is deleted, and most recently added category (under which properties are appended) is set to the one with same name. This allows easier adding of items to same categories in multiple passes.
  • Does not automatically redraw the control, so you may need to call Refresh when calling this function after control has been shown for the first time.

void wxPropertyGrid::ArrayStringToString wxString &  dst,
const wxArrayString &  src,
wxChar  preDelim,
wxChar  postDelim,
int  flags
[static]
 

Generates contents for string dst based on the convetents of wxArrayString src.

Format will be str1<postDelim> str2<postDelim> and so on. Set flags to 1 inorder to convert backslashes to double-back- slashes and "<preDelims>"'s to "\<preDelims>".

void wxPropertyGrid::AutoGetTranslation bool  enable  )  [static]
 

This static function enables or disables automatic use of wxGetTranslation for following strings: wxEnumProperty list labels, wxFlagsProperty sub-property labels.

Default is false.

void wxPropertyContainerMethods::BeginAddChildren wxPGId  id  )  [inherited]
 

Inorder to add new items into a property with fixed children (for instance, wxFlagsProperty), you need to call this method.

After populating has been finished, you need to call EndAddChildren.

bool wxPropertyGrid::CanClose  )  [inline]
 

Returns true if all property grid data changes have been committed.

Usually only returns false if value in active editor has been invalidated by a wxValidator.

void wxPropertyGrid::CenterSplitter bool  enable_auto_centering = false  ) 
 

Centers the splitter.

If argument is true, automatic splitter centering is enabled (only applicapple if style wxPG_SPLITTER_AUTO_CENTER was defined).

void wxPropertyGrid::Clear  ) 
 

Deletes all properties.

Does not free memory allocated for arrays etc. This should *not* be called in wxPropertyGridManager.

void wxPropertyGrid::ClearModifiedStatus  )  [inline]
 

Resets modified status of all properties.

void wxPropertyGrid::ClearModifiedStatus wxPGId  id  )  [inline]
 

Resets modified status of a property and all sub-properties.

bool wxPropertyGrid::ClearPropertyValue const wxString &  name  )  [inline]
 

Resets value of a property to its default.

bool wxPropertyGrid::ClearPropertyValue wxPGId  id  ) 
 

Resets value of a property to its default.

bool wxPropertyGrid::ClearSelection  ) 
 

Deselect current selection, if any.

Returns true if success (ie. validator did not intercept).

void wxPropertyGrid::ClearTargetPage  )  [inline]
 

Synonymous to Clear.

bool wxPropertyGrid::Collapse const wxString &  name  )  [inline]
 

Collapses given category or property with children.

Returns true if actually collapses.

bool wxPropertyGrid::Collapse wxPGId  id  )  [inline]
 

Collapses given category or property with children.

Returns true if actually collapses.

bool wxPropertyGrid::CollapseAll  )  [inline]
 

Collapses all items that can be collapsed.

Return values:
Return false if failed (may fail if editor value cannot be validated).

bool wxPropertyGrid::Compact bool  compact  ) 
 

Shows(arg = false) or hides(arg = true) all hideable properties.

bool wxPropertyGrid::Create wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = (0),
const wxChar *  name = wxPropertyGridNameStr
 

Two step creation.

Whenever the control is created without any parameters, use Create to actually create it. Don't access the control's public methods before this is called

See also:
Additional Window Styles

wxPGProperty* wxPropertyContainerMethods::CreatePropertyByClass const wxString &  classname,
const wxString &  label,
const wxString &  name
[static, inherited]
 

Constructs a property.

Class used is given as the first string argument. It may be either normal property class name, such as "wxIntProperty" or a short one such as "Int".

wxPGProperty* wxPropertyContainerMethods::CreatePropertyByType const wxString &  valuetype,
const wxString &  label,
const wxString &  name
[static, inherited]
 

Constructs a property.

Value type name used is given as the first string argument. It may be "string", "long", etc. Any value returned by wxVariant::GetType fits there.

Otherwise, this is similar as CreatePropertyByClass.

Remarks:
Cannot generate property category.

virtual wxPropertyGridState* wxPropertyGrid::CreateState  )  const [protected, virtual]
 

wxPropertyGridState used by the grid is created here.

If grid is used in wxPropertyGridManager, there is no point overriding this - instead, set custom wxPropertyGridPage classes.

void wxPropertyContainerMethods::Delete const wxString &  name  )  [inline, inherited]
 

Deletes a property by name.

void wxPropertyContainerMethods::Delete wxPGId  id  )  [inherited]
 

Deletes a property by id.

If category is deleted, all children are automatically deleted as well.

void wxPropertyContainerMethods::DeletePropertyChoice wxPGId  id,
int  index
[inherited]
 

Deletes choice from a property.

If selected item is deleted, then the value is set to unspecified.

See AddPropertyChoice for more details.

bool wxPropertyGrid::Disable const wxString &  name  )  [inline]
 

Disables property.

bool wxPropertyGrid::Disable wxPGId  id  )  [inline]
 

Disables property.

bool wxPropertyGrid::DisableProperty const wxString &  name  )  [inline]
 

Disables property.

bool wxPropertyGrid::DisableProperty wxPGId  id  )  [inline]
 

Disables property.

void wxPropertyGrid::DoubleToString wxString &  target,
double  value,
int  precision,
bool  removeZeroes,
wxString *  precTemplate
[static]
 

Standardized double-to-string conversion.

void wxPropertyGrid::EditorsValueWasModified  )  [inline]
 

Call when editor widget's contents is modified.

For example, this is called when changes text in wxTextCtrl (used in wxStringProperty and wxIntProperty).

Remarks:
This should only be called by properties.
See also:

void wxPropertyGrid::EditorsValueWasNotModified  )  [inline]
 

Reverse of EditorsValueWasModified().

bool wxPropertyGrid::EditorValidate  )  [inline]
 

Returns true if all property grid data changes have been committed.

Usually only returns false if value in active editor has been invalidated by a wxValidator.

bool wxPropertyGrid::EnableCategories bool  enable  ) 
 

Enables or disables (shows/hides) categories according to parameter enable.

bool wxPropertyGrid::EnableProperty const wxString &  name,
bool  enable = true
[inline]
 

Enables or disables property, depending on whether enable is true or false.

bool wxPropertyGrid::EnableProperty wxPGId  id,
bool  enable = true
 

Enables or disables property, depending on whether enable is true or false.

void wxPropertyContainerMethods::EndAddChildren wxPGId  id  )  [inherited]
 

Called after population of property with fixed children has finished.

bool wxPropertyGrid::EnsureVisible const wxString &  name  )  [inline]
 

Scrolls and/or expands items to ensure that the given item is visible.

Returns true if something was actually done.

bool wxPropertyGrid::EnsureVisible wxPGId  id  ) 
 

Scrolls and/or expands items to ensure that the given item is visible.

Returns true if something was actually done.

bool wxPropertyGrid::Expand const wxString &  name  )  [inline]
 

Expands given category or property with children.

Returns true if actually expands.

bool wxPropertyGrid::Expand wxPGId  id  )  [inline]
 

Expands given category or property with children.

Returns true if actually expands.

void wxPropertyGrid::ExpandAll  )  [inline]
 

Expands all items that can be expanded.

void wxPropertyGrid::FixPosForTextCtrl wxWindow *  ctrl  ) 
 

Fixes position of wxTextCtrl-like control (wxSpinCtrl usually fits as one).

Call after control has been created (but before shown).

wxWindow* wxPropertyGrid::GenerateEditorButton const wxPoint &  pos,
const wxSize &  sz
 

Shortcut for creating dialog-caller button.

Used, for example, by wxFontProperty.

Remarks:
This should only be called by properties.

wxWindow* wxPropertyGrid::GenerateEditorTextCtrl const wxPoint &  pos,
const wxSize &  sz,
const wxString &  value,
wxWindow *  secondary,
int  extraStyle = 0,
int  maxLen = 0
 

Shortcut for creating text editor widget.

Parameters:
pos Same as pos given for CreateEditor.
sz Same as sz given for CreateEditor.
value Initial text for wxTextCtrl.
secondary If right-side control, such as button, also created, then create it first and pass it as this parameter.
extraStyle Extra style flags to pass for wxTextCtrl.
Remarks:
Note that this should generally be called only by new classes derived from wxPGProperty.

wxColour wxPropertyGrid::GetCaptionBackgroundColour  )  const [inline]
 

Returns current category caption background colour.

wxColour wxPropertyGrid::GetCaptionForegroundColour  )  const [inline]
 

Returns current category caption text colour.

wxColour wxPropertyGrid::GetCellBackgroundColour  )  const [inline]
 

Returns current cell background colour.

wxColour wxPropertyGrid::GetCellDisabledTextColour  )  const [inline]
 

Returns current cell text colour when disabled.

wxColour wxPropertyGrid::GetCellTextColour  )  const [inline]
 

Returns current cell text colour.

size_t wxPropertyGrid::GetChildrenCount const wxString &  name  )  [inline]
 

Returns number of children for the property.

size_t wxPropertyGrid::GetChildrenCount wxPGId  id  )  const [inline]
 

Returns number of children for the property.

NB: Cannot be in container methods class due to name hiding.

size_t wxPropertyGrid::GetChildrenCount  )  [inline]
 

Returns number of children of the root property.

wxWindow* wxPropertyGrid::GetEditorControl  )  const
 

Returns pointer to current active primary editor control (NULL if none).

If editor uses clipper window, pointer is returned to the actual editor, not the clipper.

wxWindow* wxPropertyGrid::GetEditorControlSecondary  )  const [inline]
 

Returns pointer to current active secondary editor control (NULL if none).

wxPGId wxPropertyGrid::GetFirst  )  const [inline]
 

Returns id of first item, whether it is a category or property.

wxPGId wxPropertyGrid::GetFirstCategory  )  const [inline]
 

Returns id of first category (from target page).

wxPGId wxPropertyContainerMethods::GetFirstChild wxPGId  id  )  [inline, inherited]
 

Returns id of first child of given property.

Remarks:
Does not return sub-properties!

wxPGId wxPropertyGrid::GetFirstProperty  )  [inline]
 

Returns id of first property that is not a category.

wxPGId wxPropertyGrid::GetFirstVisible  )  const [inline]
 

Returns id of first visible item, whether it is a category or property.

Note that visible item means category, property, or sub-property which user can see when control is scrolled properly. It does not only mean items that are actually painted on the screen.

int wxPropertyGrid::GetFontHeight  )  const [inline]
 

Returns height of highest characters of used font.

wxPoint wxPropertyGrid::GetGoodEditorDialogPosition wxPGProperty p,
const wxSize &  sz
 

Generates position for a widget editor dialog box.

Parameters:
p Property for which dialog is positioned.
sz Known or over-approximated size of the dialog.
Return values:
Position for dialog.

wxPropertyGrid* wxPropertyGrid::GetGrid  )  [inline]
 

Returns pointer to itself.

Dummy function that enables same kind of code to use wxPropertyGrid and wxPropertyGridManager.

wxSize wxPropertyGrid::GetImageSize wxPGId  id = wxPGId((wxPGProperty *) NULL)  )  const
 

Returns size of the custom paint image in front of property.

If no argument is given, returns preferred size.

wxPGId wxPropertyGrid::GetItemAtY int  y  )  [inline]
 

Returns property (or category) at given y coordinate (relative to control's top left).

wxPGId wxPropertyGrid::GetLastChild wxPGId  id  )  [inline]
 

Returns id of last child of given property.

Remarks:
Returns even sub-properties.

wxPGId wxPropertyGrid::GetLastProperty  )  [inline]
 

Returns id of last item.

Ignores categories and sub-properties.

wxPGId wxPropertyGrid::GetLastVisible  )  [inline]
 

Returns id of last visible item.

Does not ignore categories sub-properties.

wxColour wxPropertyGrid::GetLineColour  )  const [inline]
 

Returns colour of lines between cells.

wxColour wxPropertyGrid::GetMarginColour  )  const [inline]
 

Returns background colour of margin.

wxPGId wxPropertyGrid::GetNextCategory wxPGId  id  )  const [inline]
 

Returns id of next category after a given property (which does not have to be category).

wxPGId wxPropertyGrid::GetNextProperty wxPGId  id  )  [inline]
 

Returns id of next property.

This does not iterate to sub-properties or categories, unlike GetNextVisible.

wxPGId wxPropertyContainerMethods::GetNextSibling wxPGId  id  )  [inline, inherited]
 

Returns next item under the same parent.

wxPGId wxPropertyGrid::GetNextVisible wxPGId  property  )  const [inline]
 

Returns id of next visible item.

Note that visible item means category, property, or sub-property which user can see when control is scrolled properly. It does not only mean items that are actually painted on the screen.

wxPGId wxPropertyGrid::GetPrevProperty wxPGId  id  )  [inline]
 

Returns id of previous property.

Unlike GetPrevVisible, this skips categories and sub-properties.

wxPGId wxPropertyGrid::GetPrevSibling wxPGId  id  )  [inline]
 

Returns id of previous item under the same parent.

wxPGId wxPropertyGrid::GetPrevVisible wxPGId  id  )  [inline]
 

Returns id of previous visible property.

wxString wxPropertyContainerMethods::GetPropertyAttributes wxPGId  id,
unsigned int  flagmask = 0xFFFF
const [inline, inherited]
 

Returns comma-delimited string with property's attributes (both pseudo-attributes such as "Disabled" and "Modified" and real attributes such as "BoolUseCheckbox" - actual names may vary).

Parameters:
flagmask Combination of property flags that should be included (in addition to any other attributes). For example, to avoid adding Modified attribute use ~(wxPG_PROP_MODIFIED).
Remarks:
Atleast in 1.2.x and earlier this does not return complete list of attributes (for example, no floating point precision) and some attributes have generic names (such as "Special1" instead of "UseCheckbox" etc)

wxColour wxPropertyGrid::GetPropertyBackgroundColour wxPGId  id  )  const
 

Returns cell background colour of a property.

wxPGId wxPropertyGrid::GetPropertyByLabel const wxString &  name  )  const [inline]
 

Returns id of property with given label (case-sensitive).

If there is no property with such label, returned property id is invalid ( i.e. it will return false with IsOk method). If there are multiple properties with identical name, most recent added is returned.

wxPGId wxPropertyContainerMethods::GetPropertyByName const wxString &  name,
const wxString &  subname
const [inherited]
 

Returns id of a sub-property 'subname' of property 'name'.

Same as calling GetPropertyByNameI(wxT("name.subname")), albeit slightly faster.

wxPGId wxPropertyContainerMethods::GetPropertyByName const wxString &  name  )  const [inherited]
 

Returns id of property with given name (case-sensitive).

If there is no property with such name, returned property id is invalid ( i.e. it will return false with IsOk method).

Remarks:
  • Sub-properties (i.e. properties which have parent that is not category or root) can not be accessed globally by their name. Instead, use "<property>.<subproperty>" in place of "<subproperty>".

wxPGId wxPropertyGrid::GetPropertyCategory wxPGId  id  )  const [inline]
 

Returns id of property's nearest parent category.

If no category found, returns invalid wxPGId.

wxPGChoices& wxPropertyContainerMethods::GetPropertyChoices wxPGId  id  )  [inherited]
 

Returns writable reference to property's list of choices (and relevant values).

If property does not have any choices, will return reference to an invalid set of choices that will return false on IsOk call.

const wxChar* wxPropertyContainerMethods::GetPropertyClassName const wxString &  name  )  const [inline, inherited]
 

Gets name of property's constructor function.

const wxChar* wxPropertyContainerMethods::GetPropertyClassName wxPGId  id  )  const [inline, inherited]
 

Gets name of property's constructor function.

wxPGProperty::ClientDataType wxPropertyContainerMethods::GetPropertyClientData const wxString &  name  )  const [inline, inherited]
 

Returns client data (void*) of a property.

wxPGProperty::ClientDataType wxPropertyContainerMethods::GetPropertyClientData wxPGId  id  )  const [inline, inherited]
 

Returns client data (void*) of a property.

wxColour wxPropertyGrid::GetPropertyColour wxPGId  id  )  const [inline]
 

Returns cell background colour of a property.

const wxPGEditor* wxPropertyContainerMethods::GetPropertyEditor wxPGId  id  )  const [inline, inherited]
 

Returns property's editor.

wxString wxPropertyContainerMethods::GetPropertyHelpString const wxString &  name  )  const [inline, inherited]
 

Returns help string associated with a property.

wxString wxPropertyContainerMethods::GetPropertyHelpString wxPGId  id  )  const [inline, inherited]
 

Returns help string associated with a property.

wxBitmap* wxPropertyContainerMethods::GetPropertyImage wxPGId  id  )  const [inline, inherited]
 

Returns property's custom value image (NULL of none).

unsigned int wxPropertyContainerMethods::GetPropertyIndex const wxString &  name  )  [inline, inherited]
 

Returns property's position under its parent.

unsigned int wxPropertyContainerMethods::GetPropertyIndex wxPGId  id  )  [inline, inherited]
 

Returns property's position under its parent.

const wxString& wxPropertyContainerMethods::GetPropertyLabel wxPGId  id  )  [inline, inherited]
 

Returns label of a property.

const wxString& wxPropertyContainerMethods::GetPropertyName wxPGId  id  )  [inline, inherited]
 

Returns name of a property.

Note that obviously there is no name-version of this member function.

wxPGId wxPropertyContainerMethods::GetPropertyParent const wxString &  name  )  [inline, inherited]
 

Returns parent item of a property.

wxPGId wxPropertyContainerMethods::GetPropertyParent wxPGId  id  )  [inline, inherited]
 

Returns parent item of a property.

int wxPropertyContainerMethods::GetPropertyPriority const wxString &  name  )  [inline, inherited]
 

Returns priority of a property (wxPG_HIGH or wxPG_LOW).

int wxPropertyContainerMethods::GetPropertyPriority wxPGId  id  )  [inline, inherited]
 

Returns priority of a property (wxPG_HIGH or wxPG_LOW).

wxPGProperty* wxPropertyContainerMethods::GetPropertyPtr const wxString &  name  )  const [inline, inherited]
 

Returns pointer to a property.

wxPGProperty* wxPropertyContainerMethods::GetPropertyPtr wxPGId  id  )  const [inline, inherited]
 

Returns pointer to a property.

wxRect wxPropertyGrid::GetPropertyRect const wxPGProperty p1,
const wxPGProperty p2
const
 

Returns rectangle that fully contains properties between and including p1 and p2.

wxString wxPropertyContainerMethods::GetPropertyShortClassName wxPGId  id  )  [static, inherited]
 

Returns short name for property's class.

For example, "wxPropertyCategory" translates to "Category" and "wxIntProperty" to "Int".

wxColour wxPropertyGrid::GetPropertyTextColour wxPGId  id  )  const
 

Returns cell background colour of a property.

wxValidator* wxPropertyContainerMethods::GetPropertyValidator wxPGId  id  )  [inline, inherited]
 

Returns validator of a property as a reference, which you can pass to any number of SetPropertyValidator.

wxVariant wxPropertyContainerMethods::GetPropertyValue const wxString &  name  )  [inline, inherited]
 

Returns value as wxVariant.

To get wxObject pointer from it, you will have to use WX_PG_VARIANT_TO_WXOBJECT(VARIANT,CLASSNAME) macro.

If property value is unspecified, Null variant is returned.

wxVariant wxPropertyContainerMethods::GetPropertyValue wxPGId  id  )  [inline, inherited]
 

Returns value as wxVariant.

To get wxObject pointer from it, you will have to use WX_PG_VARIANT_TO_WXOBJECT(VARIANT,CLASSNAME) macro.

If property value is unspecified, Null variant is returned.

wxVariant wxPropertyGrid::GetPropertyValues const wxString &  listname = wxEmptyString,
wxPGId  baseparent = wxPGId( (wxPGProperty*)NULL ),
long  flags = 0
const [inline]
 

Returns a wxVariant list containing wxVariant versions of all property values.

Order is not guaranteed, but generally it should match the visible order in the grid.

Parameters:
flags Use wxPG_KEEP_STRUCTURE to retain category structure; each sub category will be its own wxList of wxVariant.
Remarks:

const wxPGValueType* wxPropertyContainerMethods::GetPropertyValueType wxPGId  id  )  [inline, inherited]
 

Returns a wxPGValueType class instance that describes the property's data type.

size_t wxPropertyContainerMethods::GetPVTI wxPGId  id  )  [inline, inherited]
 

Returns property value type identifier.

wxString wxPropertyContainerMethods::GetPVTN wxPGId  id  )  [inline, inherited]
 

Returns property value type name.

wxPGId wxPropertyGrid::GetRoot  )  const [inline]
 

Returns "root property".

It does not have name, etc. and it is not visible. It is only useful for accessing its children.

int wxPropertyGrid::GetRowHeight  )  const [inline]
 

Returns height of a single grid row (in pixels).

wxPGId wxPropertyGrid::GetSelection  )  const [inline]
 

Returns currently selected property.

wxColour wxPropertyGrid::GetSelectionBackgroundColour  )  const [inline]
 

Returns current selection background colour.

wxColour wxPropertyGrid::GetSelectionForegroundColour  )  const [inline]
 

Returns current selection text colour.

int wxPropertyGrid::GetSplitterPosition  )  const [inline]
 

Returns current splitter x position.

wxPGValueType* wxPropertyContainerMethods::GetValueType const wxString &  type  )  [static, inherited]
 

Returns value type class instance for given type name.

int wxPropertyGrid::GetVerticalSpacing  )  const [inline]
 

Returns current vertical spacing.

bool wxPropertyGrid::HasSelection  )  const [inline]
 

Returns true if a property is selected.

void wxPropertyGrid::HideLowPriority  )  [inline]
 

Hides all low priority properties.

bool wxPropertyContainerMethods::HideProperty wxPGId  id,
bool  hide = true
[inherited]
 

Hides or reveals a property.

Parameters:
hide If true, hides property, otherwise reveals it.
Remarks:
Hiding properties is not compatible with priority system. Using both at the same time will yield unpredictable results.

void wxPropertyContainerMethods::InitAllTypeHandlers  )  [static, inherited]
 

Initializes *all* property types.

Causes references to most object files in the library, so calling this may cause significant increase in executable size when linking with static library.

Reimplemented in wxPropertyGridManager.

wxPGId wxPropertyGrid::Insert wxPGId  id,
int  index,
const wxString &  label,
const wxString &  name,
bool  value
[inline]
 

Insert

wxPGId wxPropertyGrid::Insert wxPGId  id,
int  index,
const wxString &  label,
const wxString &  name,
double  value
[inline]
 

Insert

wxPGId wxPropertyGrid::Insert wxPGId  id,
int  index,
const wxString &  label,
const wxString &  name,
int  value
[inline]
 

Insert

wxPGId wxPropertyGrid::Insert wxPGId  id,
int  index,
const wxString &  label,
const wxString &  name,
const wxString &  value = wxEmptyString
[inline]
 

Insert

wxPGId wxPropertyGrid::Insert const wxString &  name,
int  index,
wxPGProperty newproperty
[inline]
 

Insert

wxPGId wxPropertyGrid::Insert wxPGId  id,
int  index,
wxPGProperty newproperty
[inline]
 

Insert

wxPGId wxPropertyGrid::Insert const wxString &  name,
wxPGProperty newproperty
[inline]
 

Insert

wxPGId wxPropertyGrid::Insert wxPGId  priorthis,
wxPGProperty newproperty
[inline]
 

Inserts property to the list.

Parameters:
priorthis New property is inserted just prior to this. Available only in the first variant. There are two versions of this function to allow this parameter to be either an id or name to a property.
parent New property is inserted under this category. Available only in the second variant. There are two versions of this function to allow this parameter to be either an id or name to a property.
index Index under category. Available only in the second variant. If index is < 0, property is appended in category.
newproperty Pointer to the inserted property. wxPropertyGrid will take ownership of this object.
Returns:
Returns id for the property,
Remarks:
  • wxPropertyGrid takes the ownership of the property pointer.

While Append may be faster way to add items, make note that when both data storages (categoric and non-categoric) are active, Insert becomes even more slow. This is especially true if current mode is non-categoric.

Example of use:

// append category wxPGId my_cat_id = propertygrid->Append( new wxPropertyCategoryClass (wxT("My Category")) ); ... // insert into category - using second variant wxPGId my_item_id_1 = propertygrid->Insert( my_cat_id, 0, new wxStringProperty(wxT("My String 1")) ); // insert before to first item - using first variant wxPGId my_item_id_2 = propertygrid->Insert ( my_item_id, new wxStringProperty(wxT("My String 2")) );

void wxPropertyContainerMethods::InsertPropertyChoice wxPGId  id,
const wxString &  label,
int  index,
int  value = INT_MAX
[inherited]
 

Inserts choice to a property that can accept one.

See AddPropertyChoice for more details.

bool wxPropertyGrid::IsAnyModified  )  const [inline]
 

Returns true if any property has been modified by the user.

bool wxPropertyGrid::IsEditorsValueModified  )  const [inline]
 

Returns true if editor's value was marked modified.

bool wxPropertyGrid::IsFrozen  )  const [inline]
 

Returns true if updating is frozen (ie.

Freeze() called but not yet Thaw() ).

bool wxPropertyContainerMethods::IsModified wxPGId  id  )  const [inline, inherited]
 

Returns true if property has been modified after value set or modify flag clear by software.

NOTE: Try to use IsPropertyModified instead.

bool wxPropertyContainerMethods::IsPropertyCategory wxPGId  id  )  const [inline, inherited]
 

Returns true if property is a category.

bool wxPropertyContainerMethods::IsPropertyEnabled const wxString &  name  )  [inline, inherited]
 

Returns true if property is enabled.

bool wxPropertyContainerMethods::IsPropertyEnabled wxPGId  id  )  const [inline, inherited]
 

Returns true if property is enabled.

bool wxPropertyContainerMethods::IsPropertyExpanded wxPGId  id  )  [static, inherited]
 

Returns true if given property is expanded.

Naturally, always returns false for properties that cannot be expanded.

bool wxPropertyContainerMethods::IsPropertyKindOf wxPGId  id,
wxPGPropertyClassInfo info
[inline, static, inherited]
 

Returns true if property is of certain type.

Parameters:
info Preferably use WX_PG_CLASSINFO(PROPERTYNAME). Alternative is PROPERTYNAMEClassInfo.

bool wxPropertyContainerMethods::IsPropertyModified wxPGId  id  )  const [inline, inherited]
 

Returns true if property has been modified after value set or modify flag clear by software.

bool wxPropertyGrid::IsPropertySelected const wxString &  name  )  [inline]
 

Returns true if given property is selected.

bool wxPropertyGrid::IsPropertySelected wxPGId  id  )  const [inline]
 

Returns true if given property is selected.

bool wxPropertyContainerMethods::IsPropertyShown const wxString &  name  )  [inline, inherited]
 

Returns true if property is shown (ie.

hideproperty with true not called for it).

bool wxPropertyContainerMethods::IsPropertyShown wxPGId  id  )  const [inline, inherited]
 

Returns true if property is shown (ie.

hideproperty with true not called for it).

bool wxPropertyContainerMethods::IsPropertyUnspecified wxPGId  id  )  const [inline, inherited]
 

Returns true if property value is set to unspecified.

bool wxPropertyContainerMethods::IsPropertyValueType const wxString &  name,
const wxClassInfo *  classinfo
[inline, inherited]
 

Returns true if property's value type has same name as a class.

bool wxPropertyContainerMethods::IsPropertyValueType const wxString &  name,
const wxPGValueType valuetype
[inline, inherited]
 

Returns true if property's value type is valuetype.

bool wxPropertyContainerMethods::IsPropertyValueType const wxString &  name,
const wxChar *  typestr
[inline, inherited]
 

Returns true if property's value type has name typestr.

bool wxPropertyContainerMethods::IsPropertyValueType wxPGId  id,
const wxClassInfo *  classinfo
[inline, inherited]
 

Returns true if property's value type has same name as a class.

bool wxPropertyContainerMethods::IsPropertyValueType wxPGId  id,
const wxPGValueType valuetype
[inline, inherited]
 

Returns true if property's value type is valuetype.

bool wxPropertyContainerMethods::IsPropertyValueType wxPGId  id,
const wxChar *  typestr
[inline, inherited]
 

Returns true if property's value type has name typestr.

void wxPropertyGrid::LimitPropertyEditing const wxString &  name,
bool  limit = true
[inline]
 

Disables (limit = true) or enables (limit = false) wxTextCtrl editor of a property, if it is not the sole mean to edit the value.

void wxPropertyGrid::LimitPropertyEditing wxPGId  id,
bool  limit = true
 

Disables (limit = true) or enables (limit = false) wxTextCtrl editor of a property, if it is not the sole mean to edit the value.

void wxPropertyGrid::OnCustomEditorEvent wxCommandEvent &  event  ) 
 

Pass this function to Connect calls in propertyclass::CreateEditor.

void wxPropertyGrid::PropertyWasModified wxPGProperty p,
int  selFlags = 0
 

Call after a property modified internally.

selFlags are the same as with DoSelectProperty. NB: Avoid using this method, if possible.

void wxPropertyContainerMethods::RegisterAdditionalEditors  )  [static, inherited]
 

Initializes additional property editors (SpinCtrl etc.).

Causes references to most object files in the library, so calling this may cause significant increase in executable size when linking with static library.

void wxPropertyContainerMethods::RegisterAdvancedPropertyClasses  )  [static, inherited]
 

Basic property classes are registered by the default, but this registers advanced ones as well.

wxPGEditor* wxPropertyGrid::RegisterEditorClass wxPGEditor editor,
const wxString &  name,
bool  noDefCheck = false
[static]
 

Registers a new editor class.

Return values:
Pointer to the editor class instance that should be used.

bool wxPropertyContainerMethods::RegisterPropertyClass const wxChar *  name,
wxPGPropertyClassInfo classinfo
[static, inherited]
 

Registers property class info with specific name.

Preferably use wxPGRegisterPropertyClass(PROPERTYNAME) macro.

wxPGValueType* wxPropertyGrid::RegisterValueType wxPGValueType valueclass,
bool  noDefCheck = false,
const wxString &  className = wxEmptyString
[static]
 

Registers a new value type.

Takes ownership of the object.

Return values:
Pointer to the value type that should be used. If on with the same name already existed, then the first one will be used, and its pointer is returned instead.

wxPGId wxPropertyContainerMethods::ReplaceProperty wxPGId  id,
wxPGProperty property
[inherited]
 

Replaces property with id with newly created property.

For example, this code replaces existing property named "Flags" with one that will have different set of items:

pg->ReplaceProperty(wxT("Flags"), wxFlagsProperty(wxT("Flags"),wxPG_LABEL,newItems))
For more info, see wxPropertyGrid::Insert.

void wxPropertyGrid::ResetColours  ) 
 

Resets all colours to the original system values.

void wxPropertyGrid::ResetDefaultPriority  )  [inline]
 

Same as SetDefaultPriority(wxPG_HIGH).

bool wxPropertyGrid::SelectProperty wxPGId  id,
bool  focus = false
[inline]
 

Selects a property.

Editor widget is automatically created, but not focused unless focus is true. This will generate wxEVT_PG_SELECT event.

Parameters:
id Id to property to select.
Return values:
True if selection finished succesfully. Usually only fails if current value in editor is not valid.
See also:
wxPropertyGrid::Unselect

void wxPropertyContainerMethods::SetBoolChoices const wxChar *  true_choice,
const wxChar *  false_choice
[static, inherited]
 

Lets user to set the strings listed in the choice dropdown of a wxBoolProperty.

Defaults are "True" and "False", so changing them to, say, "Yes" and "No" may be useful in some less technical applications.

void wxPropertyGrid::SetButtonShortcut int  keycode,
bool  ctrlDown = false,
bool  altDown = false
 

Changes keyboard shortcut to push the editor button.

Remarks:
You can set default with keycode 0. Good value for the platform is guessed, but don't expect it to be very accurate.

void wxPropertyGrid::SetCaptionBackgroundColour const wxColour &  col  ) 
 

Sets category caption background colour.

void wxPropertyGrid::SetCaptionForegroundColour const wxColour &  col  ) 
 

Sets category caption text colour.

void wxPropertyGrid::SetCaptionTextColour wxPGId  id,
const wxColour &  col
 

Sets text colour of a category caption (but not it's children).

void wxPropertyGrid::SetCellBackgroundColour const wxColour &  col  ) 
 

Sets default cell background colour - applies to property cells.

Note that appearance of editor widgets may not be affected.

void wxPropertyGrid::SetCellDisabledTextColour const wxColour &  col  ) 
 

Sets cell text colour for disabled properties.

void wxPropertyGrid::SetCellTextColour const wxColour &  col  ) 
 

Sets default cell text colour - applies to property name and value text.

Note that appearance of editor widgets may not be affected.

void wxPropertyGrid::SetCurrentCategory const wxString &  name = wxEmptyString  )  [inline]
 

Sets the current category - Append will add non-categories under this one.

void wxPropertyGrid::SetCurrentCategory wxPGId  id  )  [inline]
 

Sets the current category - Append will add non-categories under this one.

void wxPropertyGrid::SetDefaultPriority int  priority  )  [inline]
 

All properties added/inserted will have given priority by default.

Parameters:
priority can be wxPG_HIGH (default) or wxPG_LOW.

void wxPropertyGrid::SetLineColour const wxColour &  col  ) 
 

Sets colour of lines between cells.

void wxPropertyGrid::SetMarginColour const wxColour &  col  ) 
 

Sets background colour of margin.

void wxPropertyContainerMethods::SetPropertyAttribute wxPGId  id,
int  attrid,
wxVariant  value,
long  argFlags = 0
[inline, inherited]
 

Sets an attribute of a property.

Ids and relevants values are totally specific to property classes and may affect either the given instance or all instances of that class. See wxPropertyGrid Property Attribute Identifiers for list of built-in attributes.

Parameters:
argFlags Optional. Use wxPG_RECURSE to set the attribute to child properties as well.
Remarks:
wxVariant doesn't have int constructor (as of 2.5.4), so you will need to cast int values (including most numeral constants) to long.

void wxPropertyGrid::SetPropertyAttributeAll int  attrid,
wxVariant  value
 

Sets property attribute for all applicapple properties.

Be sure to use this method after all properties have been added to the grid.

void wxPropertyContainerMethods::SetPropertyAttributes wxPGId  id,
const wxString &  attributes
[inline, static, inherited]
 

Sets attributes from a string generated by GetPropertyAttributes.

Remarks:
Performance may not be top-notch.

void wxPropertyGrid::SetPropertyBackgroundColour wxPGId  id,
const wxColour &  col
 

Sets background colour of property and all its children, recursively.

Colours of captions are not affected. Background brush cache is optimized for often set colours to be set last.

Remarks:
Children which already have custom background colour are not affected.

void wxPropertyContainerMethods::SetPropertyChoices const wxString &  name,
wxPGChoices choices
[inline, inherited]
 

Set choices of a property to specified set of labels and values.

void wxPropertyContainerMethods::SetPropertyChoices wxPGId  id,
wxPGChoices choices
[inline, static, inherited]
 

Set choices of a property to specified set of labels and values.

void wxPropertyContainerMethods::SetPropertyChoicesExclusive wxPGId  id  )  [inline, inherited]
 

If property's set of choices is shared, then calling this method converts it to private.

void wxPropertyContainerMethods::SetPropertyClientData const wxString &  name,
wxPGProperty::ClientDataType  clientData
[inline, inherited]
 

Sets client data (void*) of a property.

Remarks:
This untyped client data has to be deleted manually.

void wxPropertyContainerMethods::SetPropertyClientData wxPGId  id,
wxPGProperty::ClientDataType  clientData
[inline, inherited]
 

Sets client data (void*) of a property.

Remarks:
This untyped client data has to be deleted manually.

void wxPropertyGrid::SetPropertyColour wxPGId  id,
const wxColour &  col
[inline]
 

Sets background colour of property and all its children.

Colours of captions are not affected. Background brush cache is optimized for often set colours to be set last.

NOTE: This function is deprecated. Use SetPropertyBackgroundColour.

void wxPropertyGrid::SetPropertyColourToDefault wxPGId  id  ) 
 

Sets background and text colour of property and all its children to the default.

void wxPropertyContainerMethods::SetPropertyEditor wxPGId  id,
const wxString &  editorName
[inline, inherited]
 

Sets editor control of a property.

As editor argument, use editor name string, such as wxT("TextCtrl") or wxT("Choice").

void wxPropertyContainerMethods::SetPropertyEditor wxPGId  id,
const wxPGEditor editor
[inline, inherited]
 

Sets editor control of a property.

As editor argument, use wxPG_EDITOR(EditorName), where basic built-in editor names are TextCtrl, Choice, ComboBox, CheckBox, TextCtrlAndButton, and ChoiceAndButton. Additional editors include SpinCtrl and DatePickerCtrl, which also require wxPropertyGrid::RegisterAdditionalEditors() call prior using.

void wxPropertyContainerMethods::SetPropertyHelpString wxPGId  id,
const wxString &  helpString
[inline, inherited]
 

Associates the help string with property.

Remarks:
By default, text is shown either in the manager's "description" text box or in the status bar. If extra window style wxPG_EX_HELP_AS_TOOLTIPS is used, then the text will appear as a tooltip.

void wxPropertyContainerMethods::SetPropertyImage wxPGId  id,
wxBitmap &  bmp
[inline, inherited]
 

Set wxBitmap in front of the value.

Remarks:

void wxPropertyGrid::SetPropertyLabel const wxString &  name,
const wxString &  newproplabel
[inline]
 

Sets label of a property.

Remarks:
This is the only way to set property's label. There is no wxPGProperty::SetLabel() method.

void wxPropertyGrid::SetPropertyLabel wxPGId  id,
const wxString &  newproplabel
[inline]
 

Sets label of a property.

Remarks:
This is the only way to set property's name. There is not wxPGProperty::SetLabel() method.

bool wxPropertyContainerMethods::SetPropertyMaxLength const wxString &  name,
int  maxLen
[inline, inherited]
 

Sets max length of property's text.

bool wxPropertyContainerMethods::SetPropertyMaxLength wxPGId  id,
int  maxLen
[inherited]
 

Sets max length of property's text.

void wxPropertyGrid::SetPropertyName const wxString &  name,
const wxString &  newname
[inline]
 

Sets name of a property.

Parameters:
name Label of a property.
newname New name.
Remarks:
This is the only way to set property's name. There is not wxPGProperty::SetName() method.

void wxPropertyGrid::SetPropertyName wxPGId  id,
const wxString &  newname
[inline]
 

Sets name of a property.

Parameters:
id Id of a property.
newname New name.
Remarks:
This is the only way to set property's name. There is not wxPGProperty::SetName() method.

bool wxPropertyContainerMethods::SetPropertyPriority const wxString &  name,
int  priority
[inline, inherited]
 

Property is to be hidden/shown when hider button is toggled or when wxPropertyGrid::Compact is called.

bool wxPropertyContainerMethods::SetPropertyPriority wxPGId  id,
int  priority
[inherited]
 

Property is to be hidden/shown when hider button is toggled or when wxPropertyGrid::Compact is called.

void wxPropertyContainerMethods::SetPropertyReadOnly const wxString &  name,
bool  readOnly = true
[inline, inherited]
 

Sets property as read-only.

It's value cannot be changed by the user, but the editor may still be created for copying purposes.

void wxPropertyContainerMethods::SetPropertyReadOnly wxPGId  id,
bool  readOnly = true
[inline, inherited]
 

Sets property as read-only.

It's value cannot be changed by the user, but the editor may still be created for copying purposes.

void wxPropertyGrid::SetPropertyTextColour wxPGId  id,
const wxColour &  col
 

Sets text colour of property and all its children.

Remarks:
Children which already have custom text colour are not affected.

void wxPropertyGrid::SetPropertyUnspecified wxPGId  id  ) 
 

Sets property's value to unspecified.

If it has children (it may be category), then the same thing is done to them.

void wxPropertyContainerMethods::SetPropertyValidator wxPGId  id,
const wxValidator &  validator
[inline, inherited]
 

Sets validator of a property.

For example

// Allow property's value range from -100 to 100 wxIntPropertyValidator validator(-100,100); wxPGId id = pg->Append( wxIntProperty(wxT("Value 1",wxPG_LABEL,0)) ); pg->SetPropertyValidator( id, validator );

void wxPropertyGrid::SetPropertyValue const wxString &  name,
const wxULongLong &  value
[inline]
 

Sets value (wxULongLong&) of a property.

void wxPropertyGrid::SetPropertyValue const wxString &  name,
const wxLongLong &  value
[inline]
 

Sets value (wxLongLong&) of a property.

void wxPropertyGrid::SetPropertyValue const wxString &  name,
const wxSize &  value
[inline]
 

Sets value (wxSize&) of a property.

void wxPropertyGrid::SetPropertyValue const wxString &  name,
const wxPoint &  value
[inline]
 

Sets value (wxPoint&) of a property.

void wxPropertyGrid::SetPropertyValue const wxString &  name,
const wxDateTime &  value
[inline]
 

Sets value (wxDateTime&) of a property.

void wxPropertyGrid::SetPropertyValue const wxString &  name,
const wxArrayInt &  value
[inline]
 

Sets value (wxArrayInt&) of a property.

void wxPropertyGrid::SetPropertyValue const wxString &  name,
const wxArrayString &  value
[inline]
 

Sets value (wxArrayString) of a property.

void wxPropertyGrid::SetPropertyValue const wxString &  name,
wxVariant &  value
[inline]
 

Sets value (wxVariant&) of a property.

void wxPropertyGrid::SetPropertyValue const wxString &  name,
wxObject *  value
[inline]
 

Sets value (wxObject*) of a property.

void wxPropertyGrid::SetPropertyValue const wxString &  name,
void *  value
[inline]
 

Sets value (void*) of a property.

void wxPropertyGrid::SetPropertyValue const wxString &  name,
const wxChar *  value
[inline]
 

Sets value (wxString) of a property.

For properties which value type is not string, calls wxPGProperty::SetValueFromString to translate the value.

void wxPropertyGrid::SetPropertyValue const wxString &  name,
const wxString &  value
[inline]
 

Sets value (wxString) of a property.

For properties which value type is not string, calls wxPGProperty::SetValueFromString to translate the value.

void wxPropertyGrid::SetPropertyValue const wxString &  name,
bool  value
[inline]
 

Sets value (bool) of a property.

void wxPropertyGrid::SetPropertyValue const wxString &  name,
double  value
[inline]
 

Sets value (floating point) of a property.

void wxPropertyGrid::SetPropertyValue const wxString &  name,
int  value
[inline]
 

Sets value (integer) of a property.

void wxPropertyGrid::SetPropertyValue const wxString &  name,
long  value
[inline]
 

Sets value (long integer) of a property.

void wxPropertyGrid::SetPropertyValue wxPGId  id,
const wxDateTime &  value
[inline]
 

Sets value (wxDateTime&) of a property.

void wxPropertyGrid::SetPropertyValue wxPGId  id,
const wxArrayInt &  value
[inline]
 

Sets value (wxArrayInt&) of a property.

void wxPropertyGrid::SetPropertyValue wxPGId  id,
const wxULongLong &  value
[inline]
 

Sets value (wxULongLong&) of a property.

void wxPropertyGrid::SetPropertyValue wxPGId  id,
const wxLongLong &  value
[inline]
 

Sets value (wxLongLong&) of a property.

void wxPropertyGrid::SetPropertyValue wxPGId  id,
const wxSize &  value
[inline]
 

Sets value (wxSize&) of a property.

void wxPropertyGrid::SetPropertyValue wxPGId  id,
const wxPoint &  value
[inline]
 

Sets value (wxPoint&) of a property.

void wxPropertyGrid::SetPropertyValue wxPGId  id,
wxVariant &  value
 

Sets value (wxVariant&) of a property.

void wxPropertyGrid::SetPropertyValue wxPGId  id,
void *  value
[inline]
 

Sets value (void*) of a property.

void wxPropertyGrid::SetPropertyValue wxPGId  id,
wxObject *  value
 

Sets value (wxObject*) of a property.

void wxPropertyGrid::SetPropertyValue wxPGId  id,
const wxArrayString &  value
[inline]
 

Sets value (wxArrayString) of a property.

void wxPropertyGrid::SetPropertyValue wxPGId  id,
const wxString &  value
 

Sets value (wxString) of a property.

Remarks:
This method uses wxPGProperty::SetValueFromString, which all properties should implement. This means that there should not be a type error, and instead the string is converted to property's actual value type.

void wxPropertyGrid::SetPropertyValue wxPGId  id,
bool  value
[inline]
 

Sets value (bool) of a property.

void wxPropertyGrid::SetPropertyValue wxPGId  id,
double  value
[inline]
 

Sets value (floating point) of a property.

void wxPropertyGrid::SetPropertyValue wxPGId  id,
int  value
[inline]
 

Sets value (integer) of a property.

void wxPropertyGrid::SetPropertyValue wxPGId  id,
long  value
[inline]
 

Sets value (long integer) of a property.

void wxPropertyGrid::SetPropertyValues const wxVariantList &  list,
wxPGId  default_category
[inline]
 

Sets various property values from a list of wxVariants.

If property with name is missing from the grid, new property is created under given default category (or root if omitted).

void wxPropertyGrid::SetSelectionBackground const wxColour &  col  ) 
 

Sets selection background colour - applies to selected property name background.

void wxPropertyGrid::SetSelectionForeground const wxColour &  col  ) 
 

Sets selection foreground colour - applies to selected property name text.

void wxPropertyGrid::SetSplitterLeft bool  subProps = false  ) 
 

Moves splitter as left as possible, while still allowing all labels to be shown in full.

Parameters:
subProps If false, will still allow sub-properties (ie. properties which parent is not root or category) to be cropped.

void wxPropertyGrid::SetSplitterPosition int  newxpos,
bool  refresh = true
[inline]
 

Sets x coordinate of the splitter.

void wxPropertyGrid::SetVerticalSpacing int  vspacing  )  [inline]
 

Sets vertical spacing.

Can be 1, 2, or 3 - a value relative to font height. Value of 2 should be default on most platforms.

Remarks:
On wxMSW, wxComboBox, when used as property editor widget, will spill out with anything less than 3.

virtual void wxPropertyGrid::SetWindowStyleFlag long  style  )  [virtual]
 

Overridden function.

See also:
Additional Window Styles

void wxPropertyGrid::ShowLowPriority  )  [inline]
 

Shows all low priority properties.

void wxPropertyGrid::ShowPropertyError wxPGId  id,
const wxString &  msg
[inline]
 

Shows an brief error message that is related to a property.

void wxPropertyGrid::SLAlloc unsigned int  itemcount,
const wxChar **  items
 

Puts items into sl.

Automatic wxGetTranslation is used if enabled.

wxArrayString& wxPropertyGrid::SLGet  )  [inline]
 

Returns sl.

void wxPropertyGrid::Sort const wxString &  name  )  [inline]
 

Sorts children of a category.

void wxPropertyGrid::Sort wxPGId  id  ) 
 

Sorts children of a category.

void wxPropertyGrid::Sort  ) 
 

Sorts all items at all levels (except sub-properties).

void wxPropertyGrid::SwitchState wxPropertyGridState pNewState  ) 
 

Mostly useful for page switching.

void wxPropertyContainerMethods::TogglePropertyPriority const wxString &  name  )  [inline, inherited]
 

Toggles priority of a property between wxPG_HIGH and wxPG_LOW.

void wxPropertyContainerMethods::TogglePropertyPriority wxPGId  id  )  [inline, inherited]
 

Toggles priority of a property between wxPG_HIGH and wxPG_LOW.


The documentation for this class was generated from the following file:
Generated on Mon Oct 29 16:56:24 2007 for wxPropertyGrid by doxygen 1.3.6