1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxPGProperty
4 // Author: wxWidgets team
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
8 // -----------------------------------------------------------------------
11 @class wxPropertyGridInterface
13 Most of the shared property manipulation interface shared by wxPropertyGrid,
14 wxPropertyGridPage, and wxPropertyGridManager is defined in this class.
17 - In separate wxPropertyGrid component this class was known as
18 wxPropertyContainerMethods.
20 - wxPropertyGridInterface's property operation member functions all accept
21 a special wxPGPropArg id argument, using which you can refer to properties
22 either by their pointer (for performance) or by their name (for conveniency).
27 class WXDLLIMPEXP_PROPGRID wxPropertyGridInterface
32 virtual ~wxPropertyGridInterface() { }
35 Appends property to the list. wxPropertyGrid assumes ownership of the
36 object. Becomes child of most recently added category.
39 - wxPropertyGrid takes the ownership of the property pointer.
40 - If appending a category with name identical to a category already in
41 the wxPropertyGrid, then newly created category is deleted, and most
42 recently added category (under which properties are appended) is set
43 to the one with same name. This allows easier adding of items to same
44 categories in multiple passes.
45 - Does not automatically redraw the control, so you may need to call
46 Refresh() when calling this function after control has been shown for
48 - This functions deselects selected property, if any. Validation
49 failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, ie.
50 selection is cleared even if editor had invalid value.
52 wxPGProperty
* Append( wxPGProperty
* property
);
55 Same as Append(), but appends under given parent property.
58 Name or pointer to parent property.
63 wxPGProperty
* AppendIn( wxPGPropArg id
, wxPGProperty
* newProperty
);
66 In order to add new items into a property with private children (for
67 instance, wxFlagsProperty), you need to call this method.
68 After populating has been finished, you need to call EndAddChildren().
72 void BeginAddChildren( wxPGPropArg id
);
75 Deletes all properties.
77 @remarks This functions deselects selected property, if any. Validation
78 failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, ie.
79 selection is cleared even if editor had invalid value.
81 virtual void Clear() = 0;
84 Clears current selection, if any.
87 If set to @false, deselecting the property will always work,
88 even if its editor had invalid value in it.
90 @return Returns @true if successful or if there was no selection. May
91 fail if validation was enabled and active editor had invalid
94 @remarks In wxPropertyGrid 1.4, this member function used to send
95 wxPG_EVT_SELECTED. In wxWidgets 2.9 and later, it no longer
98 @see wxPropertyGrid::SelectProperty()
100 bool ClearSelection( bool validation
= false);
103 Resets modified status of all properties.
105 void ClearModifiedStatus();
108 Collapses given category or property with children.
110 @return Returns @true if actually collapsed.
112 @remarks This function may deselect selected property, if any. Validation
113 failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, ie.
114 selection is cleared even if editor had invalid value.
116 bool Collapse( wxPGPropArg id
);
119 Collapses all items that can be collapsed.
121 @remarks This functions clears selection. Validation failure option
122 wxPG_VFB_STAY_IN_PROPERTY is not respected, ie. selection
123 is cleared even if editor had invalid value.
128 Changes value of a property, as if by user. Use this instead of
129 SetPropertyValue() if you need the value to run through validation
130 process, and also send the property change event.
132 @return Returns @true if value was successfully changed.
134 bool ChangePropertyValue( wxPGPropArg id
, wxVariant newValue
);
137 Removes and deletes a property and any children.
140 Pointer or name of a property.
142 @remarks If you delete a property in a wxPropertyGrid event
143 handler, the actual deletion is postponed until the next
146 This functions deselects selected property, if any.
147 Validation failure option wxPG_VFB_STAY_IN_PROPERTY is not
148 respected, ie. selection is cleared even if editor had
151 void DeleteProperty( wxPGPropArg id
);
156 @see EnableProperty(), wxPGProperty::Enable()
158 bool DisableProperty( wxPGPropArg id
);
161 Returns @true if all property grid data changes have been committed. Usually
162 only returns @false if value in active editor has been invalidated by a
165 bool EditorValidate();
168 Enables or disables property. Disabled property usually appears as
172 Name or pointer to a property.
174 If @false, property is disabled instead.
176 @see wxPGProperty::Enable()
178 bool EnableProperty( wxPGPropArg id
, bool enable
= true );
181 Called after population of property with fixed children has finished.
183 @see BeginAddChildren()
185 void EndAddChildren( wxPGPropArg id
);
188 Expands given category or property with children.
190 @return Returns @true if actually expanded.
192 @remarks This function may deselect selected property, if any. Validation
193 failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, ie.
194 selection is cleared even if editor had invalid value.
196 bool Expand( wxPGPropArg id
);
199 Expands all items that can be expanded.
201 @remarks This functions clears selection. Validation failure option
202 wxPG_VFB_STAY_IN_PROPERTY is not respected, ie. selection
203 is cleared even if editor had invalid value.
205 bool ExpandAll( bool expand
= true );
208 Returns auto-resize proportion of the given column.
210 @see SetColumnProportion()
212 int GetColumnProportion( unsigned int column
) const;
215 Returns id of first child of given property.
217 @remarks Does not return private children!
219 wxPGProperty
* GetFirstChild( wxPGPropArg id
);
223 Returns iterator class instance.
226 See @ref propgrid_iterator_flags. Value wxPG_ITERATE_DEFAULT causes
227 iteration over everything except private child properties.
229 Property to start iteration from. If @NULL, then first child of root
233 wxPropertyGridIterator
GetIterator( int flags
= wxPG_ITERATE_DEFAULT
,
234 wxPGProperty
* firstProp
= NULL
);
235 wxPropertyGridConstIterator
GetIterator( int flags
= wxPG_ITERATE_DEFAULT
,
236 wxPGProperty
* firstProp
= NULL
) const;
241 Returns iterator class instance.
244 See @ref propgrid_iterator_flags. Value wxPG_ITERATE_DEFAULT causes
245 iteration over everything except private child properties.
247 Either wxTOP or wxBOTTOM. wxTOP will indicate that iterations start
248 from the first property from the top, and wxBOTTOM means that the
249 iteration will instead begin from bottommost valid item.
252 wxPropertyGridIterator
GetIterator( int flags
, int startPos
);
253 wxPropertyGridConstIterator
GetIterator( int flags
, int startPos
) const;
257 Returns id of first item that matches given criteria.
260 See @ref propgrid_iterator_flags.
262 wxPGProperty
* GetFirst( int flags
= wxPG_ITERATE_ALL
);
265 Returns pointer to a property with given name (case-sensitive).
266 If there is no property with such name, @NULL pointer is returned.
268 @remarks Properties which have non-category, non-root parent
269 cannot be accessed globally by their name. Instead, use
270 "<property>.<subproperty>" instead of "<subproperty>".
272 wxPGProperty
* GetProperty( const wxString
& name
) const;
275 Adds to 'targetArr' pointers to properties that have given flags 'flags' set.
276 However, if @a 'inverse' is set to @true, then only properties without
277 given flags are stored.
282 Property flags to use.
286 Iterator flags to use. Default is everything expect private children.
287 See @ref propgrid_iterator_flags.
289 void GetPropertiesWithFlag( wxArrayPGProperty
* targetArr
,
290 wxPGProperty::FlagType flags
,
291 bool inverse
= false,
292 int iterFlags
= (wxPG_ITERATE_PROPERTIES
|wxPG_ITERATE_HIDDEN
|wxPG_ITERATE_CATEGORIES
) ) const;
295 Returns value of given attribute. If none found, returns wxNullVariant.
297 wxVariant
GetPropertyAttribute( wxPGPropArg id
, const wxString
& attrName
) const;
300 Returns background colour of first cell of a property.
302 wxColour
GetPropertyBackgroundColour( wxPGPropArg id
) const;
305 Returns pointer of property's nearest parent category. If no category
306 found, returns @NULL.
308 wxPropertyCategory
* GetPropertyCategory( wxPGPropArg id
) const;
310 /** Returns client data (void*) of a property. */
311 void* GetPropertyClientData( wxPGPropArg id
) const;
314 Returns first property which label matches given string. @NULL if none
315 found. Note that this operation is very slow when compared to
318 wxPGProperty
* GetPropertyByLabel( const wxString
& label
) const;
321 Returns pointer to a property with given name (case-sensitive).
322 If there is no property with such name, @NULL pointer is returned.
324 @remarks Properties which have non-category, non-root parent
325 cannot be accessed globally by their name. Instead, use
326 "<property>.<subproperty>" instead of "<subproperty>".
328 wxPGProperty
* GetPropertyByName( const wxString
& name
) const;
331 Returns child property 'subname' of property 'name'. Same as
332 calling GetPropertyByName("name.subname"), albeit slightly faster.
334 wxPGProperty
* GetPropertyByName( const wxString
& name
,
335 const wxString
& subname
) const;
338 Returns property's editor.
340 const wxPGEditor
* GetPropertyEditor( wxPGPropArg id
) const;
343 Returns help string associated with a property.
345 wxString
GetPropertyHelpString( wxPGPropArg id
) const;
348 Returns property's custom value image (@NULL of none).
350 wxBitmap
* GetPropertyImage( wxPGPropArg id
) const;
352 /** Returns label of a property. */
353 const wxString
& GetPropertyLabel( wxPGPropArg id
);
355 /** Returns property's name, by which it is globally accessible. */
356 wxString
GetPropertyName( wxPGProperty
* property
);
359 Returns text colour of first cell of a property.
361 wxColour
GetPropertyTextColour( wxPGPropArg id
) const;
364 Returns validator of a property as a reference, which you
365 can pass to any number of SetPropertyValidator.
367 wxValidator
* GetPropertyValidator( wxPGPropArg id
);
370 Returns property's value as wxVariant.
372 If property value is unspecified, Null variant is returned.
374 wxVariant
GetPropertyValue( wxPGPropArg id
);
376 /** Return's property's value as wxArrayInt. */
377 wxArrayInt
GetPropertyValueAsArrayInt( wxPGPropArg id
) const;
379 /** Returns property's value as wxArrayString. */
380 wxArrayString
GetPropertyValueAsArrayString( wxPGPropArg id
) const;
382 /** Returns property's value as bool */
383 bool GetPropertyValueAsBool( wxPGPropArg id
) const;
385 /** Return's property's value as wxDateTime. */
386 wxDateTime
GetPropertyValueAsDateTime( wxPGPropArg id
) const;
388 /** Returns property's value as double-precision floating point number. */
389 double GetPropertyValueAsDouble( wxPGPropArg id
) const;
391 /** Returns property's value as integer */
392 int GetPropertyValueAsInt( wxPGPropArg id
) const;
394 /** Returns property's value as integer */
395 long GetPropertyValueAsLong( wxPGPropArg id
) const;
397 /** Returns property's value as native signed 64-bit integer. */
398 wxLongLong_t
GetPropertyValueAsLongLong( wxPGPropArg id
) const;
401 Returns property's value as wxString. If property does not
402 use string value type, then its value is converted using
403 wxPGProperty::GetValueAsString().
405 wxString
GetPropertyValueAsString( wxPGPropArg id
) const;
407 /** Returns property's value as unsigned integer */
408 unsigned long GetPropertyValueAsULong( wxPGPropArg id
) const;
410 /** Returns property's value as native unsigned 64-bit integer. */
411 wxULongLong_t
GetPropertyValueAsULongLong( wxPGPropArg id
) const;
414 Returns a wxVariant list containing wxVariant versions of all
415 property values. Order is not guaranteed.
422 Use wxPG_KEEP_STRUCTURE to retain category structure; each sub
423 category will be its own wxVariantList of wxVariant.
425 Use wxPG_INC_ATTRIBUTES to include property attributes as well.
426 Each attribute will be stored as list variant named
427 "@@<propname>@@attr."
429 wxVariant
GetPropertyValues( const wxString
& listname
= wxEmptyString
,
430 wxPGProperty
* baseparent
= NULL
, long flags
= 0 ) const;
433 Returns list of currently selected properties.
435 @remarks wxArrayPGProperty should be compatible with std::vector API.
437 const wxArrayPGProperty
& GetSelectedProperties() const;
440 Returns currently selected property. NULL if none.
442 @remarks When wxPG_EX_MULTIPLE_SELECTION extra style is used, this
443 member function returns the focused property, that is the
444 one which can have active editor.
446 wxPGProperty
* GetSelection() const;
449 Similar to GetIterator(), but instead returns wxPGVIterator instance,
450 which can be useful for forward-iterating through arbitrary property
454 See @ref propgrid_iterator_flags.
456 virtual wxPGVIterator
GetVIterator( int flags
) const;
459 Hides or reveals a property.
464 If @true, hides property, otherwise reveals it.
466 By default changes are applied recursively. Set this parameter
467 wxPG_DONT_RECURSE to prevent this.
469 bool HideProperty( wxPGPropArg id
, bool hide
= true, int flags
= wxPG_RECURSE
);
472 Initializes *all* property types. Causes references to most object
473 files in the library, so calling this may cause significant increase
474 in executable size when linking with static library.
476 static void InitAllTypeHandlers();
479 Inserts property to the property container.
482 New property is inserted just prior to this. Available only
483 in the first variant. There are two versions of this function
484 to allow this parameter to be either an id or name to
487 Pointer to the inserted property. wxPropertyGrid will take
488 ownership of this object.
490 @return Returns newProperty.
494 - wxPropertyGrid takes the ownership of the property pointer.
496 - While Append may be faster way to add items, make note that when
497 both types of data storage (categoric and
498 non-categoric) are active, Insert becomes even more slow. This is
499 especially true if current mode is non-categoric.
501 - This functions deselects selected property, if any. Validation
502 failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, ie.
503 selection is cleared even if editor had invalid value.
510 wxPGProperty* my_cat_id = propertygrid->Append( new wxPropertyCategory("My Category") );
514 // insert into category - using second variant
515 wxPGProperty* my_item_id_1 = propertygrid->Insert( my_cat_id, 0, new wxStringProperty("My String 1") );
517 // insert before to first item - using first variant
518 wxPGProperty* my_item_id_2 = propertygrid->Insert( my_item_id, new wxStringProperty("My String 2") );
522 wxPGProperty
* Insert( wxPGPropArg priorThis
, wxPGProperty
* newProperty
);
525 Inserts property to the property container.
526 See the other overload for more details.
529 New property is inserted under this category. Available only
530 in the second variant. There are two versions of this function
531 to allow this parameter to be either an id or name to
534 Index under category. Available only in the second variant.
535 If index is < 0, property is appended in category.
537 Pointer to the inserted property. wxPropertyGrid will take
538 ownership of this object.
540 @return Returns newProperty.
542 wxPGProperty
* Insert( wxPGPropArg parent
, int index
, wxPGProperty
* newProperty
);
544 /** Returns @true if property is a category. */
545 bool IsPropertyCategory( wxPGPropArg id
) const;
547 /** Returns @true if property is enabled. */
548 bool IsPropertyEnabled( wxPGPropArg id
) const;
551 Returns @true if given property is expanded. Naturally, always returns
552 @false for properties that cannot be expanded.
554 bool IsPropertyExpanded( wxPGPropArg id
) const;
557 Returns @true if property has been modified after value set or modify
558 flag clear by software.
560 bool IsPropertyModified( wxPGPropArg id
) const;
563 Returns true if property is selected.
565 virtual bool IsPropertySelected( wxPGPropArg id
) const;
568 Returns @true if property is shown (ie. HideProperty() with @true not
571 bool IsPropertyShown( wxPGPropArg id
) const;
574 Returns @true if property value is set to unspecified.
576 bool IsPropertyValueUnspecified( wxPGPropArg id
) const;
579 Disables (limit = @true) or enables (limit = @false) wxTextCtrl editor
580 of a property, if it is not the sole mean to edit the value.
582 void LimitPropertyEditing( wxPGPropArg id
, bool limit
= true );
585 Initializes additional property editors (SpinCtrl etc.). Causes
586 references to most object files in the library, so calling this may
587 cause significant increase in executable size when linking with static
590 static void RegisterAdditionalEditors();
593 Removes a property. Does not delete the property object, but
597 Pointer or name of a property.
599 @remarks Removed property cannot have any children.
601 Also, if you remove property in a wxPropertyGrid event
602 handler, the actual removal is postponed until the next
605 wxPGProperty
* RemoveProperty( wxPGPropArg id
);
608 Replaces property with id with newly created one. For example,
609 this code replaces existing property named "Flags" with one that
610 will have different set of items:
613 pg->ReplaceProperty("Flags",
614 wxFlagsProperty("Flags", wxPG_LABEL, newItems))
619 wxPGProperty
* ReplaceProperty( wxPGPropArg id
, wxPGProperty
* property
);
622 @anchor propgridinterface_editablestate_flags
624 Flags for wxPropertyGridInterface::SaveEditableState() and
625 wxPropertyGridInterface::RestoreEditableState().
627 enum EditableStateFlags
629 /** Include selected property. */
630 SelectionState
= 0x01,
631 /** Include expanded/collapsed property information. */
632 ExpandedState
= 0x02,
633 /** Include scrolled position. */
634 ScrollPosState
= 0x04,
635 /** Include selected page information. Only applies to
636 wxPropertyGridManager. */
638 /** Include splitter position. Stored for each page. */
639 SplitterPosState
= 0x10,
640 /** Include description box size.
641 Only applies to wxPropertyGridManager. */
645 Include all supported user editable state information.
646 This is usually the default value. */
647 AllStates
= SelectionState
|
656 Restores user-editable state. See also wxPropertyGridInterface::SaveEditableState().
659 String generated by SaveEditableState.
662 Which parts to restore from source string. See @ref propgridinterface_editablestate_flags
663 "list of editable state flags".
665 @return Returns @false if there was problem reading the string.
667 @remarks If some parts of state (such as scrolled or splitter position)
668 fail to restore correctly, please make sure that you call this
669 function after wxPropertyGrid size has been set (this may
670 sometimes be tricky when sizers are used).
672 bool RestoreEditableState( const wxString
& src
,
673 int restoreStates
= AllStates
);
676 Used to acquire user-editable state (selected property, expanded
677 properties, scrolled position, splitter positions).
679 @param includedStates
680 Which parts of state to include. See @ref propgridinterface_editablestate_flags
681 "list of editable state flags".
683 wxString
SaveEditableState( int includedStates
= AllStates
) const;
686 Sets strings listed in the choice dropdown of a wxBoolProperty.
688 Defaults are "True" and "False", so changing them to, say, "Yes" and
689 "No" may be useful in some less technical applications.
691 static void SetBoolChoices( const wxString
& trueChoice
,
692 const wxString
& falseChoice
);
695 Set proportion of a auto-stretchable column. wxPG_SPLITTER_AUTO_CENTER
696 window style needs to be used to indicate that columns are auto-
699 @returns Returns @false on failure.
701 @remarks You should call this for individual pages of
702 wxPropertyGridManager (if used).
704 @see GetColumnProportion()
706 bool SetColumnProportion( unsigned int column
, int proportion
);
709 Sets an attribute for this property.
714 Text identifier of attribute. See @ref propgrid_property_attributes.
719 Use wxPG_RECURSE to set the attribute to child properties recursively.
721 @remarks Setting attribute's value to Null variant will simply remove it
722 from property's set of attributes.
724 void SetPropertyAttribute( wxPGPropArg id
, const wxString
& attrName
,
725 wxVariant value
, long argFlags
= 0 );
728 Sets property attribute for all applicapple properties.
729 Be sure to use this method only after all properties have been
732 void SetPropertyAttributeAll( const wxString
& attrName
, wxVariant value
);
735 Sets background colour of a property.
738 Property name or pointer.
741 New background colour.
744 Default is wxPG_RECURSE which causes colour to be set recursively.
745 Omit this flag to only set colour for the property in question
746 and not any of its children.
748 void SetPropertyBackgroundColour( wxPGPropArg id
,
749 const wxColour
& colour
,
750 int flags
= wxPG_RECURSE
);
753 Sets text, bitmap, and colours for given column's cell.
756 - You can set label cell by using column 0.
757 - You can use wxPG_LABEL as text to use default text for column.
759 void SetPropertyCell( wxPGPropArg id
,
761 const wxString
& text
= wxEmptyString
,
762 const wxBitmap
& bitmap
= wxNullBitmap
,
763 const wxColour
& fgCol
= wxNullColour
,
764 const wxColour
& bgCol
= wxNullColour
);
767 Sets client data (void*) of a property.
770 This untyped client data has to be deleted manually.
772 void SetPropertyClientData( wxPGPropArg id
, void* clientData
);
775 Resets text and background colours of given property.
777 void SetPropertyColoursToDefault( wxPGPropArg id
);
780 Sets editor for a property.
785 For builtin editors, use wxPGEditor_X, where X is builtin editor's
786 name (TextCtrl, Choice, etc. see wxPGEditor documentation for full
789 For custom editors, use pointer you received from wxPropertyGrid::RegisterEditorClass().
791 void SetPropertyEditor( wxPGPropArg id
, const wxPGEditor
* editor
);
794 Sets editor control of a property. As editor argument, use
795 editor name string, such as "TextCtrl" or "Choice".
797 void SetPropertyEditor( wxPGPropArg id
, const wxString
& editorName
);
800 Sets label of a property.
803 - Properties under same parent may have same labels. However,
804 property names must still remain unique.
806 void SetPropertyLabel( wxPGPropArg id
, const wxString
& newproplabel
);
809 Sets name of a property.
812 Name or pointer of property which name to change.
815 New name for property.
817 void SetPropertyName( wxPGPropArg id
, const wxString
& newName
);
820 Sets property (and, recursively, its children) to have read-only value.
821 In other words, user cannot change the value in the editor, but they can
825 Property name or pointer.
828 Use @true to enable read-only, @false to disable it.
831 By default changes are applied recursively. Set this parameter
832 wxPG_DONT_RECURSE to prevent this.
834 @remarks This is mainly for use with textctrl editor. Only some other
835 editors fully support it.
837 void SetPropertyReadOnly( wxPGPropArg id
, bool set
= true,
838 int flags
= wxPG_RECURSE
);
841 Sets property's value to unspecified. If it has children (it may be
842 category), then the same thing is done to them.
844 void SetPropertyValueUnspecified( wxPGPropArg id
);
847 Sets property values from a list of wxVariants.
849 void SetPropertyValues( const wxVariantList
& list
,
850 wxPGPropArg defaultCategory
= wxNullProperty
);
853 Sets property values from a list of wxVariants.
855 void SetPropertyValues( const wxVariant
& list
,
856 wxPGPropArg defaultCategory
= wxNullProperty
);
859 Associates the help string with property.
861 @remarks By default, text is shown either in the manager's "description"
862 text box or in the status bar. If extra window style
863 wxPG_EX_HELP_AS_TOOLTIPS is used, then the text will appear as
866 void SetPropertyHelpString( wxPGPropArg id
, const wxString
& helpString
);
869 Set wxBitmap in front of the value.
871 @remarks Bitmap will be scaled to a size returned by
872 wxPropertyGrid::GetImageSize();
874 void SetPropertyImage( wxPGPropArg id
, wxBitmap
& bmp
);
877 Sets max length of property's text.
879 bool SetPropertyMaxLength( wxPGPropArg id
, int maxLen
);
883 Sets text colour of a property.
886 Property name or pointer.
889 New background colour.
892 Default is wxPG_RECURSE which causes colour to be set recursively.
893 Omit this flag to only set colour for the property in question
894 and not any of its children.
896 void SetPropertyTextColour( wxPGPropArg id
,
897 const wxColour
& colour
,
898 int flags
= wxPG_RECURSE
);
901 Sets validator of a property.
903 void SetPropertyValidator( wxPGPropArg id
, const wxValidator
& validator
);
905 /** Sets value (integer) of a property. */
906 void SetPropertyValue( wxPGPropArg id
, long value
);
908 /** Sets value (integer) of a property. */
909 void SetPropertyValue( wxPGPropArg id
, int value
);
911 /** Sets value (floating point) of a property. */
912 void SetPropertyValue( wxPGPropArg id
, double value
);
914 /** Sets value (bool) of a property. */
915 void SetPropertyValue( wxPGPropArg id
, bool value
);
917 /** Sets value (string) of a property. */
918 void SetPropertyValue( wxPGPropArg id
, const wxString
& value
);
920 /** Sets value (wxArrayString) of a property. */
921 void SetPropertyValue( wxPGPropArg id
, const wxArrayString
& value
);
923 /** Sets value (wxDateTime) of a property. */
924 void SetPropertyValue( wxPGPropArg id
, const wxDateTime
& value
);
926 /** Sets value (wxObject*) of a property. */
927 void SetPropertyValue( wxPGPropArg id
, wxObject
* value
);
929 /** Sets value (wxObject&) of a property. */
930 void SetPropertyValue( wxPGPropArg id
, wxObject
& value
);
932 /** Sets value (native 64-bit int) of a property. */
933 void SetPropertyValue( wxPGPropArg id
, wxLongLong_t value
);
935 /** Sets value (native 64-bit unsigned int) of a property. */
936 void SetPropertyValue( wxPGPropArg id
, wxULongLong_t value
);
938 /** Sets value (wxArrayInt&) of a property. */
939 void SetPropertyValue( wxPGPropArg id
, const wxArrayInt
& value
);
942 Sets value (wxString) of a property.
944 @remarks This method uses wxPGProperty::SetValueFromString(), which all
945 properties should implement. This means that there should not be
946 a type error, and instead the string is converted to property's
949 void SetPropertyValueString( wxPGPropArg id
, const wxString
& value
);
952 Sets value (wxVariant&) of a property.
954 @remarks Use wxPropertyGrid::ChangePropertyValue() instead if you need to
955 run through validation process and send property change event.
957 void SetPropertyValue( wxPGPropArg id
, wxVariant value
);
960 Adjusts how wxPropertyGrid behaves when invalid value is entered
964 See @ref propgrid_vfbflags for possible values.
966 void SetValidationFailureBehavior( int vfbFlags
);
969 Sorts all properties recursively.
972 This can contain any of the following options:
973 wxPG_SORT_TOP_LEVEL_ONLY: Only sort categories and their
974 immediate children. Sorting done by wxPG_AUTO_SORT option
977 @see SortChildren, wxPropertyGrid::SetSortFunction
979 void Sort( int flags
= 0 );
982 Sorts children of a property.
985 Name or pointer to a property.
988 This can contain any of the following options:
989 wxPG_RECURSE: Sorts recursively.
991 @see Sort, wxPropertyGrid::SetSortFunction
993 void SortChildren( wxPGPropArg id
, int flags
= 0 );
996 Returns editor pointer of editor with given name;
998 static wxPGEditor
* GetEditorByName( const wxString
& editorName
);