1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxPGProperty
4 // Author: wxWidgets team
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 // -----------------------------------------------------------------------
12 @class wxPropertyGridInterface
14 Most of the shared property manipulation interface shared by wxPropertyGrid,
15 wxPropertyGridPage, and wxPropertyGridManager is defined in this class.
18 - In separate wxPropertyGrid component this class was known as
19 wxPropertyContainerMethods.
21 - wxPropertyGridInterface's property operation member functions all accept
22 a special wxPGPropArg id argument, using which you can refer to properties
23 either by their pointer (for performance) or by their name (for conveniency).
28 class WXDLLIMPEXP_PROPGRID wxPropertyGridInterface
33 virtual ~wxPropertyGridInterface() { }
36 Appends property to the list. wxPropertyGrid assumes ownership of the
37 object. Becomes child of most recently added category.
40 - wxPropertyGrid takes the ownership of the property pointer.
41 - If appending a category with name identical to a category already in
42 the wxPropertyGrid, then newly created category is deleted, and most
43 recently added category (under which properties are appended) is set
44 to the one with same name. This allows easier adding of items to same
45 categories in multiple passes.
46 - Does not automatically redraw the control, so you may need to call
47 Refresh() when calling this function after control has been shown for
49 - This functions deselects selected property, if any. Validation
50 failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, ie.
51 selection is cleared even if editor had invalid value.
53 wxPGProperty
* Append( wxPGProperty
* property
);
56 Same as Append(), but appends under given parent property.
59 Name or pointer to parent property.
64 wxPGProperty
* AppendIn( wxPGPropArg id
, wxPGProperty
* newProperty
);
67 In order to add new items into a property with private children (for
68 instance, wxFlagsProperty), you need to call this method.
69 After populating has been finished, you need to call EndAddChildren().
73 void BeginAddChildren( wxPGPropArg id
);
76 Deletes all properties.
78 @remarks This functions deselects selected property, if any. Validation
79 failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, ie.
80 selection is cleared even if editor had invalid value.
82 virtual void Clear() = 0;
85 Clears current selection, if any.
88 If set to @false, deselecting the property will always work,
89 even if its editor had invalid value in it.
91 @return Returns @true if successful or if there was no selection. May
92 fail if validation was enabled and active editor had invalid
95 @remarks In wxPropertyGrid 1.4, this member function used to send
96 wxPG_EVT_SELECTED. In wxWidgets 2.9 and later, it no longer
99 @see wxPropertyGrid::SelectProperty()
101 bool ClearSelection( bool validation
= false);
104 Resets modified status of all properties.
106 void ClearModifiedStatus();
109 Collapses given category or property with children.
111 @return Returns @true if actually collapsed.
113 @remarks This function may deselect selected property, if any. Validation
114 failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, ie.
115 selection is cleared even if editor had invalid value.
117 bool Collapse( wxPGPropArg id
);
120 Collapses all items that can be collapsed.
122 @remarks This functions clears selection. Validation failure option
123 wxPG_VFB_STAY_IN_PROPERTY is not respected, ie. selection
124 is cleared even if editor had invalid value.
129 Changes value of a property, as if by user. Use this instead of
130 SetPropertyValue() if you need the value to run through validation
131 process, and also send the property change event.
133 @return Returns @true if value was successfully changed.
135 bool ChangePropertyValue( wxPGPropArg id
, wxVariant newValue
);
138 Removes and deletes a property and any children.
141 Pointer or name of a property.
143 @remarks If you delete a property in a wxPropertyGrid event
144 handler, the actual deletion is postponed until the next
147 This functions deselects selected property, if any.
148 Validation failure option wxPG_VFB_STAY_IN_PROPERTY is not
149 respected, ie. selection is cleared even if editor had
152 void DeleteProperty( wxPGPropArg id
);
157 @see EnableProperty(), wxPGProperty::Enable()
159 bool DisableProperty( wxPGPropArg id
);
162 Returns @true if all property grid data changes have been committed. Usually
163 only returns @false if value in active editor has been invalidated by a
166 bool EditorValidate();
169 Enables or disables property. Disabled property usually appears as
173 Name or pointer to a property.
175 If @false, property is disabled instead.
177 @see wxPGProperty::Enable()
179 bool EnableProperty( wxPGPropArg id
, bool enable
= true );
182 Called after population of property with fixed children has finished.
184 @see BeginAddChildren()
186 void EndAddChildren( wxPGPropArg id
);
189 Expands given category or property with children.
191 @return Returns @true if actually expanded.
193 @remarks This function may deselect selected property, if any. Validation
194 failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, ie.
195 selection is cleared even if editor had invalid value.
197 bool Expand( wxPGPropArg id
);
200 Expands all items that can be expanded.
202 @remarks This functions clears selection. Validation failure option
203 wxPG_VFB_STAY_IN_PROPERTY is not respected, ie. selection
204 is cleared even if editor had invalid value.
206 bool ExpandAll( bool expand
= true );
209 Returns auto-resize proportion of the given column.
211 @see SetColumnProportion()
213 int GetColumnProportion( unsigned int column
) const;
216 Returns id of first child of given property.
218 @remarks Does not return private children!
220 wxPGProperty
* GetFirstChild( wxPGPropArg id
);
224 Returns iterator class instance.
227 See @ref propgrid_iterator_flags. Value wxPG_ITERATE_DEFAULT causes
228 iteration over everything except private child properties.
230 Property to start iteration from. If @NULL, then first child of root
234 Instead of ++ operator, use Next() method, and instead of * operator,
235 use GetProperty() method. There is also GetPyIterator() method (which
236 takes the same arguments but instead returns a pythonic iterator),
237 @c Properties attribute which is an iterator over all non-category,
238 non-private properties, and finally @c Items attribute which is an
239 iterator over all items except private child properties.
242 wxPropertyGridIterator
GetIterator( int flags
= wxPG_ITERATE_DEFAULT
,
243 wxPGProperty
* firstProp
= NULL
);
244 wxPropertyGridConstIterator
GetIterator( int flags
= wxPG_ITERATE_DEFAULT
,
245 wxPGProperty
* firstProp
= NULL
) const;
250 Returns iterator class instance.
253 See @ref propgrid_iterator_flags. Value wxPG_ITERATE_DEFAULT causes
254 iteration over everything except private child properties.
256 Either wxTOP or wxBOTTOM. wxTOP will indicate that iterations start
257 from the first property from the top, and wxBOTTOM means that the
258 iteration will instead begin from bottommost valid item.
261 Instead of ++ operator, use Next() method, and instead of * operator,
262 use GetProperty() method. There is also GetPyIterator() method (which
263 takes the same arguments but instead returns a pythonic iterator),
264 @c Properties attribute which is an iterator over all non-category,
265 non-private properties, and finally @c Items attribute which is an
266 iterator over all items except private child properties.
269 wxPropertyGridIterator
GetIterator( int flags
, int startPos
);
270 wxPropertyGridConstIterator
GetIterator( int flags
, int startPos
) const;
274 Returns id of first item that matches given criteria.
277 See @ref propgrid_iterator_flags.
279 wxPGProperty
* GetFirst( int flags
= wxPG_ITERATE_ALL
);
282 Returns pointer to a property with given name (case-sensitive).
283 If there is no property with such name, @NULL pointer is returned.
285 @remarks Properties which have non-category, non-root parent
286 can not be accessed globally by their name. Instead, use
287 "<property>.<subproperty>" instead of "<subproperty>".
289 wxPGProperty
* GetProperty( const wxString
& name
) const;
292 Adds to 'targetArr' pointers to properties that have given flags 'flags' set.
293 However, if @a 'inverse' is set to @true, then only properties without
294 given flags are stored.
299 Property flags to use.
303 Iterator flags to use. Default is everything expect private children.
304 See @ref propgrid_iterator_flags.
306 void GetPropertiesWithFlag( wxArrayPGProperty
* targetArr
,
307 wxPGProperty::FlagType flags
,
308 bool inverse
= false,
309 int iterFlags
= (wxPG_ITERATE_PROPERTIES
|wxPG_ITERATE_HIDDEN
|wxPG_ITERATE_CATEGORIES
) ) const;
312 Returns value of given attribute. If none found, returns wxNullVariant.
314 wxVariant
GetPropertyAttribute( wxPGPropArg id
, const wxString
& attrName
) const;
317 Returns background colour of first cell of a property.
319 wxColour
GetPropertyBackgroundColour( wxPGPropArg id
) const;
322 Returns pointer of property's nearest parent category. If no category
323 found, returns @NULL.
325 wxPropertyCategory
* GetPropertyCategory( wxPGPropArg id
) const;
327 /** Returns client data (void*) of a property. */
328 void* GetPropertyClientData( wxPGPropArg id
) const;
331 Returns first property which label matches given string. @NULL if none
332 found. Note that this operation is very slow when compared to
335 wxPGProperty
* GetPropertyByLabel( const wxString
& label
) const;
338 Returns pointer to a property with given name (case-sensitive).
339 If there is no property with such name, @NULL pointer is returned.
341 @remarks Properties which have non-category, non-root parent
342 can not be accessed globally by their name. Instead, use
343 "<property>.<subproperty>" instead of "<subproperty>".
345 wxPGProperty
* GetPropertyByName( const wxString
& name
) const;
348 Returns child property 'subname' of property 'name'. Same as
349 calling GetPropertyByName("name.subname"), albeit slightly faster.
351 wxPGProperty
* GetPropertyByName( const wxString
& name
,
352 const wxString
& subname
) const;
355 Returns property's editor.
357 const wxPGEditor
* GetPropertyEditor( wxPGPropArg id
) const;
360 Returns help string associated with a property.
362 wxString
GetPropertyHelpString( wxPGPropArg id
) const;
365 Returns property's custom value image (@NULL of none).
367 wxBitmap
* GetPropertyImage( wxPGPropArg id
) const;
369 /** Returns label of a property. */
370 const wxString
& GetPropertyLabel( wxPGPropArg id
);
372 /** Returns property's name, by which it is globally accessible. */
373 wxString
GetPropertyName( wxPGProperty
* property
);
376 Returns text colour of first cell of a property.
378 wxColour
GetPropertyTextColour( wxPGPropArg id
) const;
381 Returns validator of a property as a reference, which you
382 can pass to any number of SetPropertyValidator.
384 wxValidator
* GetPropertyValidator( wxPGPropArg id
);
387 Returns property's value as wxVariant.
389 If property value is unspecified, Null variant is returned.
391 wxVariant
GetPropertyValue( wxPGPropArg id
);
393 /** Return's property's value as wxArrayInt. */
394 wxArrayInt
GetPropertyValueAsArrayInt( wxPGPropArg id
) const;
396 /** Returns property's value as wxArrayString. */
397 wxArrayString
GetPropertyValueAsArrayString( wxPGPropArg id
) const;
399 /** Returns property's value as bool */
400 bool GetPropertyValueAsBool( wxPGPropArg id
) const;
402 /** Return's property's value as wxDateTime. */
403 wxDateTime
GetPropertyValueAsDateTime( wxPGPropArg id
) const;
405 /** Returns property's value as double-precision floating point number. */
406 double GetPropertyValueAsDouble( wxPGPropArg id
) const;
408 /** Returns property's value as integer */
409 int GetPropertyValueAsInt( wxPGPropArg id
) const;
411 /** Returns property's value as integer */
412 long GetPropertyValueAsLong( wxPGPropArg id
) const;
414 /** Returns property's value as native signed 64-bit integer. */
415 wxLongLong_t
GetPropertyValueAsLongLong( wxPGPropArg id
) const;
418 Returns property's value as wxString. If property does not
419 use string value type, then its value is converted using
420 wxPGProperty::GetValueAsString().
422 wxString
GetPropertyValueAsString( wxPGPropArg id
) const;
424 /** Returns property's value as unsigned integer */
425 unsigned long GetPropertyValueAsULong( wxPGPropArg id
) const;
427 /** Returns property's value as native unsigned 64-bit integer. */
428 wxULongLong_t
GetPropertyValueAsULongLong( wxPGPropArg id
) const;
431 Returns a wxVariant list containing wxVariant versions of all
432 property values. Order is not guaranteed.
439 Use wxPG_KEEP_STRUCTURE to retain category structure; each sub
440 category will be its own wxVariantList of wxVariant.
442 Use wxPG_INC_ATTRIBUTES to include property attributes as well.
443 Each attribute will be stored as list variant named
444 "@@<propname>@@attr."
446 wxVariant
GetPropertyValues( const wxString
& listname
= wxEmptyString
,
447 wxPGProperty
* baseparent
= NULL
, long flags
= 0 ) const;
450 Returns list of currently selected properties.
452 @remarks wxArrayPGProperty should be compatible with std::vector API.
454 const wxArrayPGProperty
& GetSelectedProperties() const;
457 Returns currently selected property. NULL if none.
459 @remarks When wxPG_EX_MULTIPLE_SELECTION extra style is used, this
460 member function returns the focused property, that is the
461 one which can have active editor.
463 wxPGProperty
* GetSelection() const;
466 Similar to GetIterator(), but instead returns wxPGVIterator instance,
467 which can be useful for forward-iterating through arbitrary property
471 See @ref propgrid_iterator_flags.
474 Instead of ++ operator, use Next() method, and instead of * operator,
475 use GetProperty() method. There is also GetPyVIterator() method (which
476 takes the same arguments but instead returns a pythonic iterator),
477 @c Properties attribute which is an iterator over all non-category,
478 non-private properties, and finally @c Items attribute which is an
479 iterator over all items except private child properties.
482 virtual wxPGVIterator
GetVIterator( int flags
) const;
485 Hides or reveals a property.
490 If @true, hides property, otherwise reveals it.
492 By default changes are applied recursively. Set this parameter
493 wxPG_DONT_RECURSE to prevent this.
495 bool HideProperty( wxPGPropArg id
, bool hide
= true, int flags
= wxPG_RECURSE
);
498 Initializes *all* property types. Causes references to most object
499 files in the library, so calling this may cause significant increase
500 in executable size when linking with static library.
502 static void InitAllTypeHandlers();
505 Inserts property to the property container.
508 New property is inserted just prior to this. Available only
509 in the first variant. There are two versions of this function
510 to allow this parameter to be either an id or name to
513 Pointer to the inserted property. wxPropertyGrid will take
514 ownership of this object.
516 @return Returns newProperty.
520 - wxPropertyGrid takes the ownership of the property pointer.
522 - While Append may be faster way to add items, make note that when
523 both types of data storage (categoric and
524 non-categoric) are active, Insert becomes even more slow. This is
525 especially true if current mode is non-categoric.
527 - This functions deselects selected property, if any. Validation
528 failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, ie.
529 selection is cleared even if editor had invalid value.
536 wxPGProperty* my_cat_id = propertygrid->Append( new wxPropertyCategory("My Category") );
540 // insert into category - using second variant
541 wxPGProperty* my_item_id_1 = propertygrid->Insert( my_cat_id, 0, new wxStringProperty("My String 1") );
543 // insert before to first item - using first variant
544 wxPGProperty* my_item_id_2 = propertygrid->Insert( my_item_id, new wxStringProperty("My String 2") );
548 wxPGProperty
* Insert( wxPGPropArg priorThis
, wxPGProperty
* newProperty
);
551 Inserts property to the property container.
552 See the other overload for more details.
555 New property is inserted under this category. Available only
556 in the second variant. There are two versions of this function
557 to allow this parameter to be either an id or name to
560 Index under category. Available only in the second variant.
561 If index is < 0, property is appended in category.
563 Pointer to the inserted property. wxPropertyGrid will take
564 ownership of this object.
566 @return Returns newProperty.
568 wxPGProperty
* Insert( wxPGPropArg parent
, int index
, wxPGProperty
* newProperty
);
570 /** Returns @true if property is a category. */
571 bool IsPropertyCategory( wxPGPropArg id
) const;
573 /** Returns @true if property is enabled. */
574 bool IsPropertyEnabled( wxPGPropArg id
) const;
577 Returns @true if given property is expanded. Naturally, always returns
578 @false for properties that cannot be expanded.
580 bool IsPropertyExpanded( wxPGPropArg id
) const;
583 Returns @true if property has been modified after value set or modify
584 flag clear by software.
586 bool IsPropertyModified( wxPGPropArg id
) const;
589 Returns true if property is selected.
591 virtual bool IsPropertySelected( wxPGPropArg id
) const;
594 Returns @true if property is shown (ie. HideProperty() with @true not
597 bool IsPropertyShown( wxPGPropArg id
) const;
600 Returns @true if property value is set to unspecified.
602 bool IsPropertyValueUnspecified( wxPGPropArg id
) const;
605 Disables (limit = @true) or enables (limit = @false) wxTextCtrl editor
606 of a property, if it is not the sole mean to edit the value.
608 void LimitPropertyEditing( wxPGPropArg id
, bool limit
= true );
611 Initializes additional property editors (SpinCtrl etc.). Causes
612 references to most object files in the library, so calling this may
613 cause significant increase in executable size when linking with static
616 static void RegisterAdditionalEditors();
619 Removes a property. Does not delete the property object, but
623 Pointer or name of a property.
625 @remarks Removed property cannot have any children.
627 Also, if you remove property in a wxPropertyGrid event
628 handler, the actual removal is postponed until the next
631 wxPGProperty
* RemoveProperty( wxPGPropArg id
);
634 Replaces property with id with newly created one. For example,
635 this code replaces existing property named "Flags" with one that
636 will have different set of items:
639 pg->ReplaceProperty("Flags",
640 wxFlagsProperty("Flags", wxPG_LABEL, newItems))
645 wxPGProperty
* ReplaceProperty( wxPGPropArg id
, wxPGProperty
* property
);
648 @anchor propgridinterface_editablestate_flags
650 Flags for wxPropertyGridInterface::SaveEditableState() and
651 wxPropertyGridInterface::RestoreEditableState().
653 enum EditableStateFlags
655 /** Include selected property. */
656 SelectionState
= 0x01,
657 /** Include expanded/collapsed property information. */
658 ExpandedState
= 0x02,
659 /** Include scrolled position. */
660 ScrollPosState
= 0x04,
661 /** Include selected page information. Only applies to
662 wxPropertyGridManager. */
664 /** Include splitter position. Stored for each page. */
665 SplitterPosState
= 0x10,
666 /** Include description box size.
667 Only applies to wxPropertyGridManager. */
671 Include all supported user editable state information.
672 This is usually the default value. */
673 AllStates
= SelectionState
|
682 Restores user-editable state. See also wxPropertyGridInterface::SaveEditableState().
685 String generated by SaveEditableState.
688 Which parts to restore from source string. See @ref propgridinterface_editablestate_flags
689 "list of editable state flags".
691 @return Returns @false if there was problem reading the string.
693 @remarks If some parts of state (such as scrolled or splitter position)
694 fail to restore correctly, please make sure that you call this
695 function after wxPropertyGrid size has been set (this may
696 sometimes be tricky when sizers are used).
698 bool RestoreEditableState( const wxString
& src
,
699 int restoreStates
= AllStates
);
702 Used to acquire user-editable state (selected property, expanded
703 properties, scrolled position, splitter positions).
705 @param includedStates
706 Which parts of state to include. See @ref propgridinterface_editablestate_flags
707 "list of editable state flags".
709 wxString
SaveEditableState( int includedStates
= AllStates
) const;
712 Sets strings listed in the choice dropdown of a wxBoolProperty.
714 Defaults are "True" and "False", so changing them to, say, "Yes" and
715 "No" may be useful in some less technical applications.
717 static void SetBoolChoices( const wxString
& trueChoice
,
718 const wxString
& falseChoice
);
721 Set proportion of a auto-stretchable column. wxPG_SPLITTER_AUTO_CENTER
722 window style needs to be used to indicate that columns are auto-
725 @returns Returns @false on failure.
727 @remarks You should call this for individual pages of
728 wxPropertyGridManager (if used).
730 @see GetColumnProportion()
732 bool SetColumnProportion( unsigned int column
, int proportion
);
735 Sets an attribute for this property.
740 Text identifier of attribute. See @ref propgrid_property_attributes.
745 Use wxPG_RECURSE to set the attribute to child properties recursively.
747 @remarks Setting attribute's value to Null variant will simply remove it
748 from property's set of attributes.
750 void SetPropertyAttribute( wxPGPropArg id
, const wxString
& attrName
,
751 wxVariant value
, long argFlags
= 0 );
754 Sets property attribute for all applicapple properties.
755 Be sure to use this method only after all properties have been
758 void SetPropertyAttributeAll( const wxString
& attrName
, wxVariant value
);
761 Sets background colour of a property.
764 Property name or pointer.
767 New background colour.
770 Default is wxPG_RECURSE which causes colour to be set recursively.
771 Omit this flag to only set colour for the property in question
772 and not any of its children.
774 void SetPropertyBackgroundColour( wxPGPropArg id
,
775 const wxColour
& colour
,
776 int flags
= wxPG_RECURSE
);
779 Sets text, bitmap, and colours for given column's cell.
782 - You can set label cell by using column 0.
783 - You can use wxPG_LABEL as text to use default text for column.
785 void SetPropertyCell( wxPGPropArg id
,
787 const wxString
& text
= wxEmptyString
,
788 const wxBitmap
& bitmap
= wxNullBitmap
,
789 const wxColour
& fgCol
= wxNullColour
,
790 const wxColour
& bgCol
= wxNullColour
);
793 Sets client data (void*) of a property.
796 This untyped client data has to be deleted manually.
798 void SetPropertyClientData( wxPGPropArg id
, void* clientData
);
801 Resets text and background colours of given property.
803 void SetPropertyColoursToDefault( wxPGPropArg id
);
806 Sets editor for a property.
811 For builtin editors, use wxPGEditor_X, where X is builtin editor's
812 name (TextCtrl, Choice, etc. see wxPGEditor documentation for full
815 For custom editors, use pointer you received from wxPropertyGrid::RegisterEditorClass().
817 void SetPropertyEditor( wxPGPropArg id
, const wxPGEditor
* editor
);
820 Sets editor control of a property. As editor argument, use
821 editor name string, such as "TextCtrl" or "Choice".
823 void SetPropertyEditor( wxPGPropArg id
, const wxString
& editorName
);
826 Sets label of a property.
829 - Properties under same parent may have same labels. However,
830 property names must still remain unique.
832 void SetPropertyLabel( wxPGPropArg id
, const wxString
& newproplabel
);
835 Sets name of a property.
838 Name or pointer of property which name to change.
841 New name for property.
843 void SetPropertyName( wxPGPropArg id
, const wxString
& newName
);
846 Sets property (and, recursively, its children) to have read-only value.
847 In other words, user cannot change the value in the editor, but they can
851 Property name or pointer.
854 Use @true to enable read-only, @false to disable it.
857 By default changes are applied recursively. Set this parameter
858 wxPG_DONT_RECURSE to prevent this.
860 @remarks This is mainly for use with textctrl editor. Only some other
861 editors fully support it.
863 void SetPropertyReadOnly( wxPGPropArg id
, bool set
= true,
864 int flags
= wxPG_RECURSE
);
867 Sets property's value to unspecified. If it has children (it may be
868 category), then the same thing is done to them.
870 void SetPropertyValueUnspecified( wxPGPropArg id
);
873 Sets property values from a list of wxVariants.
875 void SetPropertyValues( const wxVariantList
& list
,
876 wxPGPropArg defaultCategory
= wxNullProperty
);
879 Sets property values from a list of wxVariants.
881 void SetPropertyValues( const wxVariant
& list
,
882 wxPGPropArg defaultCategory
= wxNullProperty
);
885 Associates the help string with property.
887 @remarks By default, text is shown either in the manager's "description"
888 text box or in the status bar. If extra window style
889 wxPG_EX_HELP_AS_TOOLTIPS is used, then the text will appear as
892 void SetPropertyHelpString( wxPGPropArg id
, const wxString
& helpString
);
895 Set wxBitmap in front of the value.
897 @remarks Bitmap will be scaled to a size returned by
898 wxPropertyGrid::GetImageSize();
900 void SetPropertyImage( wxPGPropArg id
, wxBitmap
& bmp
);
903 Sets max length of property's text.
905 bool SetPropertyMaxLength( wxPGPropArg id
, int maxLen
);
909 Sets text colour of a property.
912 Property name or pointer.
915 New background colour.
918 Default is wxPG_RECURSE which causes colour to be set recursively.
919 Omit this flag to only set colour for the property in question
920 and not any of its children.
922 void SetPropertyTextColour( wxPGPropArg id
,
923 const wxColour
& colour
,
924 int flags
= wxPG_RECURSE
);
927 Sets validator of a property.
929 void SetPropertyValidator( wxPGPropArg id
, const wxValidator
& validator
);
931 /** Sets value (integer) of a property. */
932 void SetPropertyValue( wxPGPropArg id
, long value
);
934 /** Sets value (integer) of a property. */
935 void SetPropertyValue( wxPGPropArg id
, int value
);
937 /** Sets value (floating point) of a property. */
938 void SetPropertyValue( wxPGPropArg id
, double value
);
940 /** Sets value (bool) of a property. */
941 void SetPropertyValue( wxPGPropArg id
, bool value
);
943 /** Sets value (string) of a property. */
944 void SetPropertyValue( wxPGPropArg id
, const wxString
& value
);
946 /** Sets value (wxArrayString) of a property. */
947 void SetPropertyValue( wxPGPropArg id
, const wxArrayString
& value
);
949 /** Sets value (wxDateTime) of a property. */
950 void SetPropertyValue( wxPGPropArg id
, const wxDateTime
& value
);
952 /** Sets value (wxObject*) of a property. */
953 void SetPropertyValue( wxPGPropArg id
, wxObject
* value
);
955 /** Sets value (wxObject&) of a property. */
956 void SetPropertyValue( wxPGPropArg id
, wxObject
& value
);
958 /** Sets value (native 64-bit int) of a property. */
959 void SetPropertyValue( wxPGPropArg id
, wxLongLong_t value
);
961 /** Sets value (native 64-bit unsigned int) of a property. */
962 void SetPropertyValue( wxPGPropArg id
, wxULongLong_t value
);
964 /** Sets value (wxArrayInt&) of a property. */
965 void SetPropertyValue( wxPGPropArg id
, const wxArrayInt
& value
);
968 Sets value (wxString) of a property.
970 @remarks This method uses wxPGProperty::SetValueFromString(), which all
971 properties should implement. This means that there should not be
972 a type error, and instead the string is converted to property's
975 void SetPropertyValueString( wxPGPropArg id
, const wxString
& value
);
978 Sets value (wxVariant&) of a property.
980 @remarks Use wxPropertyGrid::ChangePropertyValue() instead if you need to
981 run through validation process and send property change event.
983 void SetPropertyValue( wxPGPropArg id
, wxVariant value
);
986 Adjusts how wxPropertyGrid behaves when invalid value is entered
990 See @ref propgrid_vfbflags for possible values.
992 void SetValidationFailureBehavior( int vfbFlags
);
995 Sorts all properties recursively.
998 This can contain any of the following options:
999 wxPG_SORT_TOP_LEVEL_ONLY: Only sort categories and their
1000 immediate children. Sorting done by wxPG_AUTO_SORT option
1003 @see SortChildren, wxPropertyGrid::SetSortFunction
1005 void Sort( int flags
= 0 );
1008 Sorts children of a property.
1011 Name or pointer to a property.
1014 This can contain any of the following options:
1015 wxPG_RECURSE: Sorts recursively.
1017 @see Sort, wxPropertyGrid::SetSortFunction
1019 void SortChildren( wxPGPropArg id
, int flags
= 0 );
1022 Returns editor pointer of editor with given name;
1024 static wxPGEditor
* GetEditorByName( const wxString
& editorName
);