@page overview_propgrid wxPropertyGrid Overview
-Key Classes:
-@li wxPGProperty
-@li wxPropertyGrid
-@li wxPropertyGridEvent
-@li wxPropertyGridManager
-@li wxPropertyGridPage
-
- wxPropertyGrid is a specialized grid for editing properties - in other
-words name = value pairs. List of ready-to-use property classes include
-strings, numbers, flag sets, fonts, colours and many others. It is possible,
-for example, to categorize properties, set up a complete tree-hierarchy,
-add more than two columns, and set arbitrary per-property attributes.
-
- As this version of wxPropertyGrid has some backward-incompatible changes
-from version 1.4, everybody who need to maintain custom property classes
-should carefully read final section in @ref propgrid_compat.
-
-@li @ref propgrid_basics
-@li @ref propgrid_categories
-@li @ref propgrid_parentprops
-@li @ref propgrid_enumandflags
-@li @ref propgrid_advprops
-@li @ref propgrid_processingvalues
-@li @ref propgrid_iterating
-@li @ref propgrid_events
-@li @ref propgrid_tooltipandhint
-@li @ref propgrid_validating
-@li @ref propgrid_populating
-@li @ref propgrid_cellrender
-@li @ref propgrid_keyhandling
-@li @ref propgrid_customizing
-@li @ref propgrid_usage2
-@li @ref propgrid_subclassing
-@li @ref propgrid_misc
-@li @ref propgrid_proplist
-@li @ref propgrid_compat
+@tableofcontents
+
+wxPropertyGrid is a specialized grid for editing properties - in other words
+name = value pairs. List of ready-to-use property classes include strings,
+numbers, flag sets, fonts, colours and many others. It is possible, for
+example, to categorize properties, set up a complete tree-hierarchy, add more
+than two columns, and set arbitrary per-property attributes.
+
+As this version of wxPropertyGrid has some backward-incompatible changes from
+version 1.4, everybody who need to maintain custom property classes should
+carefully read final section in @ref propgrid_compat.
+
+@see wxPropertyGrid, wxPropertyGridEvent, wxPropertyGridManager,
+ wxPropertyGridPage, wxPGProperty
+
+
@section propgrid_basics Creating and Populating wxPropertyGrid
@code
// Add a file selector property.
- wxPGPropety* prop = pg->Append( new wxFileProperty("FileProperty",
- wxPG_LABEL,
- wxEmptyString) );
+ wxPGProperty* prop = pg->Append( new wxFileProperty("FileProperty",
+ wxPG_LABEL,
+ wxEmptyString) );
// Valid: Set wild card by name
pg->SetPropertyAttribute( "FileProperty",
return;
// Handle changes in values, as needed
- if ( property.GetName() == "MyStringProperty" )
+ if ( property->GetName() == "MyStringProperty" )
OnMyStringPropertyChanged(value.As<wxString>());
- else if ( property.GetName() == "MyColourProperty" )
+ else if ( property->GetName() == "MyColourProperty" )
OnMyColourPropertyChanged(value.As<wxColour>());
}
@endcode
-@beginWxPythonOnly
-PropertyGridInterface has some useful pythonic iterators as attributes.
-@c Properties lets you iterate through all items that are not category
-captions or private children. @c Items lets you iterate through everything
-except private children. Also, there are GetPyIterator() and GetPyVIterator(),
-which return pythonic iterators instead of normal wxPropertyGridIterator.
-
-If you need to use C++ style iterators in wxPython code, note that
-Instead of ++ operator, use Next() method, and instead of
-* operator, use GetProperty() method.
-@endWxPythonOnly
-
GetIterator() only works with wxPropertyGrid and the individual pages
of wxPropertyGridManager. In order to iterate through an arbitrary
property container (such as entire wxPropertyGridManager), you need to use
wxPGVIterator it;
- for ( it = manager->GetVIterator();
+ for ( it = manager->GetVIterator(wxPG_ITERATE_ALL);
!it.AtEnd();
it.Next() )
{
@section propgrid_customizing Customizing Properties (without sub-classing)
In this section are presented miscellaneous ways to have custom appearance
-and behavior for your properties without all the necessary hassle
+and behaviour for your properties without all the necessary hassle
of sub-classing a property class etc.
@subsection propgrid_customimage Setting Value Image
the sizer setup and SetSize calls!</b> (ie. usually at the end of the
frame/dialog constructor)
- Splitter centering behavior can be customized using
+ Splitter centering behaviour can be customized using
wxPropertyGridInterface::SetColumnProportion(). Usually it is used to set
non-equal column proportions, which in essence stops the splitter(s) from
being 'centered' as such, and instead just auto-resized.
incompatible changes from version 1.4, which had a stable API and will remain
as the last separate branch.
-Note that in general any behavior-breaking changes should not compile or run
+Note that in general any behaviour-breaking changes should not compile or run
without warnings or errors.
@subsection propgrid_compat_general General Changes
with keyboard. This change allowed fixing broken tab traversal on wxGTK
(which is open issue in wxPropertyGrid 1.4).
- - wxPG_EX_UNFOCUS_ON_ENTER style is removed and is now default behavior.
+ - wxPG_EX_UNFOCUS_ON_ENTER style is removed and is now default behaviour.
That is, when enter is pressed, editing is considered done and focus
moves back to the property grid from the editor control.
- A few member functions were removed from wxPropertyGridInterface.
Please use wxPGProperty's counterparts from now on.
- - wxPGChoices now has proper Copy-On-Write behavior.
+ - wxPGChoices now has proper Copy-On-Write behaviour.
- wxPGChoices::SetExclusive() was renamed to AllocExclusive().
now use wxPropertyGridInterface::GetEditableState() instead.
- wxPG_EX_DISABLE_TLP_TRACKING is now enabled by default. To get the old
- behavior (recommended if you don't use a system that reparents the grid
+ behaviour (recommended if you don't use a system that reparents the grid
on its own), use the wxPG_EX_ENABLE_TLP_TRACKING extra style.
- Extended window style wxPG_EX_LEGACY_VALIDATORS was removed.
- - Default property validation failure behavior has been changed to
+ - Default property validation failure behaviour has been changed to
(wxPG_VFB_MARK_CELL | wxPG_VFB_SHOW_MESSAGEBOX), which means that the
cell is marked red and wxMessageBox is shown. This is more user-friendly
- than the old behavior, which simply beeped and prevented leaving the
+ than the old behaviour, which simply beeped and prevented leaving the
property editor until a valid value was entered.
- wxPropertyGridManager now has same Get/SetSelection() semantics as