// Purpose: interface of wxPGProperty
// Author: wxWidgets team
// RCS-ID: $Id$
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// -----------------------------------------------------------------------
bool ChangePropertyValue( wxPGPropArg id, wxVariant newValue );
/**
- Deletes a property.
+ Removes and deletes a property and any children.
- @remarks This functions deselects selected property, if any. Validation
- failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, ie.
- selection is cleared even if editor had invalid value.
+ @param id
+ Pointer or name of a property.
+
+ @remarks If you delete a property in a wxPropertyGrid event
+ handler, the actual deletion is postponed until the next
+ idle event.
+
+ This functions deselects selected property, if any.
+ Validation failure option wxPG_VFB_STAY_IN_PROPERTY is not
+ respected, ie. selection is cleared even if editor had
+ invalid value.
*/
void DeleteProperty( wxPGPropArg id );
/**
Disables a property.
+
+ @see EnableProperty(), wxPGProperty::Enable()
*/
bool DisableProperty( wxPGPropArg id );
bool EditorValidate();
/**
- Enables or disables property.
+ Enables or disables property. Disabled property usually appears as
+ having grey text.
@param id
Name or pointer to a property.
@param enable
If @false, property is disabled instead.
+
+ @see wxPGProperty::Enable()
*/
bool EnableProperty( wxPGPropArg id, bool enable = true );
*/
bool ExpandAll( bool expand = true );
+ /**
+ Returns auto-resize proportion of the given column.
+
+ @see SetColumnProportion()
+ */
+ int GetColumnProportion( unsigned int column ) const;
+
/**
Returns id of first child of given property.
is used.
@beginWxPythonOnly
- <b>wxPython Note:</b> Instead of ++ operator, use Next() method, and
- instead of * operator, use GetProperty() method.
+ Instead of ++ operator, use Next() method, and instead of * operator,
+ use GetProperty() method. There is also GetPyIterator() method (which
+ takes the same arguments but instead returns a pythonic iterator),
+ @c Properties attribute which is an iterator over all non-category,
+ non-private properties, and finally @c Items attribute which is an
+ iterator over all items except private child properties.
@endWxPythonOnly
*/
wxPropertyGridIterator GetIterator( int flags = wxPG_ITERATE_DEFAULT,
iteration will instead begin from bottommost valid item.
@beginWxPythonOnly
- <b>wxPython Note:</b> Instead of ++ operator, use Next() method, and
- instead of * operator, use GetProperty() method.
+ Instead of ++ operator, use Next() method, and instead of * operator,
+ use GetProperty() method. There is also GetPyIterator() method (which
+ takes the same arguments but instead returns a pythonic iterator),
+ @c Properties attribute which is an iterator over all non-category,
+ non-private properties, and finally @c Items attribute which is an
+ iterator over all items except private child properties.
@endWxPythonOnly
*/
wxPropertyGridIterator GetIterator( int flags, int startPos );
If there is no property with such name, @NULL pointer is returned.
@remarks Properties which have non-category, non-root parent
- can not be accessed globally by their name. Instead, use
+ cannot be accessed globally by their name. Instead, use
"<property>.<subproperty>" instead of "<subproperty>".
*/
wxPGProperty* GetProperty( const wxString& name ) const;
If there is no property with such name, @NULL pointer is returned.
@remarks Properties which have non-category, non-root parent
- can not be accessed globally by their name. Instead, use
+ cannot be accessed globally by their name. Instead, use
"<property>.<subproperty>" instead of "<subproperty>".
*/
wxPGProperty* GetPropertyByName( const wxString& name ) const;
@param flags
See @ref propgrid_iterator_flags.
- <b>wxPython Note:</b> Instead of ++ operator, use Next() method, and
- instead of * operator, use GetProperty() method.
+ @beginWxPythonOnly
+ Instead of ++ operator, use Next() method, and instead of * operator,
+ use GetProperty() method. There is also GetPyVIterator() method (which
+ takes the same arguments but instead returns a pythonic iterator),
+ @c Properties attribute which is an iterator over all non-category,
+ non-private properties, and finally @c Items attribute which is an
+ iterator over all items except private child properties.
+ @endWxPythonOnly
*/
virtual wxPGVIterator GetVIterator( int flags ) const;
static void RegisterAdditionalEditors();
/**
- Removes and returns a property.
+ Removes a property. Does not delete the property object, but
+ instead returns it.
@param id
Pointer or name of a property.
@remarks Removed property cannot have any children.
+
+ Also, if you remove property in a wxPropertyGrid event
+ handler, the actual removal is postponed until the next
+ idle event.
*/
wxPGProperty* RemoveProperty( wxPGPropArg id );
/**
Set proportion of a auto-stretchable column. wxPG_SPLITTER_AUTO_CENTER
window style needs to be used to indicate that columns are auto-
- resizeable.
+ resizable.
@returns Returns @false on failure.
@remarks You should call this for individual pages of
wxPropertyGridManager (if used).
+
+ @see GetColumnProportion()
*/
bool SetColumnProportion( unsigned int column, int proportion );