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 wxPropertyGridIterator
GetIterator( int flags
= wxPG_ITERATE_DEFAULT
,
235 wxPGProperty
* firstProp
= NULL
);
236 wxPropertyGridConstIterator
GetIterator( int flags
= wxPG_ITERATE_DEFAULT
,
237 wxPGProperty
* firstProp
= NULL
) const;
242 Returns iterator class instance.
245 See @ref propgrid_iterator_flags. Value wxPG_ITERATE_DEFAULT causes
246 iteration over everything except private child properties.
248 Either wxTOP or wxBOTTOM. wxTOP will indicate that iterations start
249 from the first property from the top, and wxBOTTOM means that the
250 iteration will instead begin from bottommost valid item.
253 wxPropertyGridIterator
GetIterator( int flags
, int startPos
);
254 wxPropertyGridConstIterator
GetIterator( int flags
, int startPos
) const;
258 Returns id of first item that matches given criteria.
261 See @ref propgrid_iterator_flags.
263 wxPGProperty
* GetFirst( int flags
= wxPG_ITERATE_ALL
);
266 Returns pointer to a property with given name (case-sensitive).
267 If there is no property with such name, @NULL pointer is returned.
269 @remarks Properties which have non-category, non-root parent
270 cannot be accessed globally by their name. Instead, use
271 "<property>.<subproperty>" instead of "<subproperty>".
273 wxPGProperty
* GetProperty( const wxString
& name
) const;
276 Adds to 'targetArr' pointers to properties that have given flags 'flags' set.
277 However, if @a 'inverse' is set to @true, then only properties without
278 given flags are stored.
283 Property flags to use.
287 Iterator flags to use. Default is everything expect private children.
288 See @ref propgrid_iterator_flags.
290 void GetPropertiesWithFlag( wxArrayPGProperty
* targetArr
,
291 wxPGProperty::FlagType flags
,
292 bool inverse
= false,
293 int iterFlags
= (wxPG_ITERATE_PROPERTIES
|wxPG_ITERATE_HIDDEN
|wxPG_ITERATE_CATEGORIES
) ) const;
296 Returns value of given attribute. If none found, returns wxNullVariant.
298 wxVariant
GetPropertyAttribute( wxPGPropArg id
, const wxString
& attrName
) const;
301 Returns background colour of first cell of a property.
303 wxColour
GetPropertyBackgroundColour( wxPGPropArg id
) const;
306 Returns pointer of property's nearest parent category. If no category
307 found, returns @NULL.
309 wxPropertyCategory
* GetPropertyCategory( wxPGPropArg id
) const;
311 /** Returns client data (void*) of a property. */
312 void* GetPropertyClientData( wxPGPropArg id
) const;
315 Returns first property which label matches given string. @NULL if none
316 found. Note that this operation is very slow when compared to
319 wxPGProperty
* GetPropertyByLabel( const wxString
& label
) const;
322 Returns pointer to a property with given name (case-sensitive).
323 If there is no property with such name, @NULL pointer is returned.
325 @remarks Properties which have non-category, non-root parent
326 cannot be accessed globally by their name. Instead, use
327 "<property>.<subproperty>" instead of "<subproperty>".
329 wxPGProperty
* GetPropertyByName( const wxString
& name
) const;
332 Returns child property 'subname' of property 'name'. Same as
333 calling GetPropertyByName("name.subname"), albeit slightly faster.
335 wxPGProperty
* GetPropertyByName( const wxString
& name
,
336 const wxString
& subname
) const;
339 Returns property's editor.
341 const wxPGEditor
* GetPropertyEditor( wxPGPropArg id
) const;
344 Returns help string associated with a property.
346 wxString
GetPropertyHelpString( wxPGPropArg id
) const;
349 Returns property's custom value image (@NULL of none).
351 wxBitmap
* GetPropertyImage( wxPGPropArg id
) const;
353 /** Returns label of a property. */
354 const wxString
& GetPropertyLabel( wxPGPropArg id
);
356 /** Returns property's name, by which it is globally accessible. */
357 wxString
GetPropertyName( wxPGProperty
* property
);
360 Returns text colour of first cell of a property.
362 wxColour
GetPropertyTextColour( wxPGPropArg id
) const;
365 Returns validator of a property as a reference, which you
366 can pass to any number of SetPropertyValidator.
368 wxValidator
* GetPropertyValidator( wxPGPropArg id
);
371 Returns property's value as wxVariant.
373 If property value is unspecified, Null variant is returned.
375 wxVariant
GetPropertyValue( wxPGPropArg id
);
377 /** Return's property's value as wxArrayInt. */
378 wxArrayInt
GetPropertyValueAsArrayInt( wxPGPropArg id
) const;
380 /** Returns property's value as wxArrayString. */
381 wxArrayString
GetPropertyValueAsArrayString( wxPGPropArg id
) const;
383 /** Returns property's value as bool */
384 bool GetPropertyValueAsBool( wxPGPropArg id
) const;
386 /** Return's property's value as wxDateTime. */
387 wxDateTime
GetPropertyValueAsDateTime( wxPGPropArg id
) const;
389 /** Returns property's value as double-precision floating point number. */
390 double GetPropertyValueAsDouble( wxPGPropArg id
) const;
392 /** Returns property's value as integer */
393 int GetPropertyValueAsInt( wxPGPropArg id
) const;
395 /** Returns property's value as integer */
396 long GetPropertyValueAsLong( wxPGPropArg id
) const;
398 /** Returns property's value as native signed 64-bit integer. */
399 wxLongLong_t
GetPropertyValueAsLongLong( wxPGPropArg id
) const;
402 Returns property's value as wxString. If property does not
403 use string value type, then its value is converted using
404 wxPGProperty::GetValueAsString().
406 wxString
GetPropertyValueAsString( wxPGPropArg id
) const;
408 /** Returns property's value as unsigned integer */
409 unsigned long GetPropertyValueAsULong( wxPGPropArg id
) const;
411 /** Returns property's value as native unsigned 64-bit integer. */
412 wxULongLong_t
GetPropertyValueAsULongLong( wxPGPropArg id
) const;
415 Returns a wxVariant list containing wxVariant versions of all
416 property values. Order is not guaranteed.
423 Use wxPG_KEEP_STRUCTURE to retain category structure; each sub
424 category will be its own wxVariantList of wxVariant.
426 Use wxPG_INC_ATTRIBUTES to include property attributes as well.
427 Each attribute will be stored as list variant named
428 "@@<propname>@@attr."
430 wxVariant
GetPropertyValues( const wxString
& listname
= wxEmptyString
,
431 wxPGProperty
* baseparent
= NULL
, long flags
= 0 ) const;
434 Returns list of currently selected properties.
436 @remarks wxArrayPGProperty should be compatible with std::vector API.
438 const wxArrayPGProperty
& GetSelectedProperties() const;
441 Returns currently selected property. NULL if none.
443 @remarks When wxPG_EX_MULTIPLE_SELECTION extra style is used, this
444 member function returns the focused property, that is the
445 one which can have active editor.
447 wxPGProperty
* GetSelection() const;
450 Similar to GetIterator(), but instead returns wxPGVIterator instance,
451 which can be useful for forward-iterating through arbitrary property
455 See @ref propgrid_iterator_flags.
457 virtual wxPGVIterator
GetVIterator( int flags
) const;
460 Hides or reveals a property.
465 If @true, hides property, otherwise reveals it.
467 By default changes are applied recursively. Set this parameter
468 wxPG_DONT_RECURSE to prevent this.
470 bool HideProperty( wxPGPropArg id
, bool hide
= true, int flags
= wxPG_RECURSE
);
473 Initializes *all* property types. Causes references to most object
474 files in the library, so calling this may cause significant increase
475 in executable size when linking with static library.
477 static void InitAllTypeHandlers();
480 Inserts property to the property container.
483 New property is inserted just prior to this. Available only
484 in the first variant. There are two versions of this function
485 to allow this parameter to be either an id or name to
488 Pointer to the inserted property. wxPropertyGrid will take
489 ownership of this object.
491 @return Returns newProperty.
495 - wxPropertyGrid takes the ownership of the property pointer.
497 - While Append may be faster way to add items, make note that when
498 both types of data storage (categoric and
499 non-categoric) are active, Insert becomes even more slow. This is
500 especially true if current mode is non-categoric.
502 - This functions deselects selected property, if any. Validation
503 failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, ie.
504 selection is cleared even if editor had invalid value.
511 wxPGProperty* my_cat_id = propertygrid->Append( new wxPropertyCategory("My Category") );
515 // insert into category - using second variant
516 wxPGProperty* my_item_id_1 = propertygrid->Insert( my_cat_id, 0, new wxStringProperty("My String 1") );
518 // insert before to first item - using first variant
519 wxPGProperty* my_item_id_2 = propertygrid->Insert( my_item_id, new wxStringProperty("My String 2") );
523 wxPGProperty
* Insert( wxPGPropArg priorThis
, wxPGProperty
* newProperty
);
526 Inserts property to the property container.
527 See the other overload for more details.
530 New property is inserted under this category. Available only
531 in the second variant. There are two versions of this function
532 to allow this parameter to be either an id or name to
535 Index under category. Available only in the second variant.
536 If index is < 0, property is appended in category.
538 Pointer to the inserted property. wxPropertyGrid will take
539 ownership of this object.
541 @return Returns newProperty.
543 wxPGProperty
* Insert( wxPGPropArg parent
, int index
, wxPGProperty
* newProperty
);
545 /** Returns @true if property is a category. */
546 bool IsPropertyCategory( wxPGPropArg id
) const;
548 /** Returns @true if property is enabled. */
549 bool IsPropertyEnabled( wxPGPropArg id
) const;
552 Returns @true if given property is expanded. Naturally, always returns
553 @false for properties that cannot be expanded.
555 bool IsPropertyExpanded( wxPGPropArg id
) const;
558 Returns @true if property has been modified after value set or modify
559 flag clear by software.
561 bool IsPropertyModified( wxPGPropArg id
) const;
564 Returns true if property is selected.
566 virtual bool IsPropertySelected( wxPGPropArg id
) const;
569 Returns @true if property is shown (ie. HideProperty() with @true not
572 bool IsPropertyShown( wxPGPropArg id
) const;
575 Returns @true if property value is set to unspecified.
577 bool IsPropertyValueUnspecified( wxPGPropArg id
) const;
580 Disables (limit = @true) or enables (limit = @false) wxTextCtrl editor
581 of a property, if it is not the sole mean to edit the value.
583 void LimitPropertyEditing( wxPGPropArg id
, bool limit
= true );
586 Initializes additional property editors (SpinCtrl etc.). Causes
587 references to most object files in the library, so calling this may
588 cause significant increase in executable size when linking with static
591 static void RegisterAdditionalEditors();
594 Removes a property. Does not delete the property object, but
598 Pointer or name of a property.
600 @remarks Removed property cannot have any children.
602 Also, if you remove property in a wxPropertyGrid event
603 handler, the actual removal is postponed until the next
606 wxPGProperty
* RemoveProperty( wxPGPropArg id
);
609 Replaces property with id with newly created one. For example,
610 this code replaces existing property named "Flags" with one that
611 will have different set of items:
614 pg->ReplaceProperty("Flags",
615 wxFlagsProperty("Flags", wxPG_LABEL, newItems))
620 wxPGProperty
* ReplaceProperty( wxPGPropArg id
, wxPGProperty
* property
);
623 @anchor propgridinterface_editablestate_flags
625 Flags for wxPropertyGridInterface::SaveEditableState() and
626 wxPropertyGridInterface::RestoreEditableState().
628 enum EditableStateFlags
630 /** Include selected property. */
631 SelectionState
= 0x01,
632 /** Include expanded/collapsed property information. */
633 ExpandedState
= 0x02,
634 /** Include scrolled position. */
635 ScrollPosState
= 0x04,
636 /** Include selected page information. Only applies to
637 wxPropertyGridManager. */
639 /** Include splitter position. Stored for each page. */
640 SplitterPosState
= 0x10,
641 /** Include description box size.
642 Only applies to wxPropertyGridManager. */
646 Include all supported user editable state information.
647 This is usually the default value. */
648 AllStates
= SelectionState
|
657 Restores user-editable state. See also wxPropertyGridInterface::SaveEditableState().
660 String generated by SaveEditableState.
663 Which parts to restore from source string. See @ref propgridinterface_editablestate_flags
664 "list of editable state flags".
666 @return Returns @false if there was problem reading the string.
668 @remarks If some parts of state (such as scrolled or splitter position)
669 fail to restore correctly, please make sure that you call this
670 function after wxPropertyGrid size has been set (this may
671 sometimes be tricky when sizers are used).
673 bool RestoreEditableState( const wxString
& src
,
674 int restoreStates
= AllStates
);
677 Used to acquire user-editable state (selected property, expanded
678 properties, scrolled position, splitter positions).
680 @param includedStates
681 Which parts of state to include. See @ref propgridinterface_editablestate_flags
682 "list of editable state flags".
684 wxString
SaveEditableState( int includedStates
= AllStates
) const;
687 Sets strings listed in the choice dropdown of a wxBoolProperty.
689 Defaults are "True" and "False", so changing them to, say, "Yes" and
690 "No" may be useful in some less technical applications.
692 static void SetBoolChoices( const wxString
& trueChoice
,
693 const wxString
& falseChoice
);
696 Set proportion of a auto-stretchable column. wxPG_SPLITTER_AUTO_CENTER
697 window style needs to be used to indicate that columns are auto-
700 @returns Returns @false on failure.
702 @remarks You should call this for individual pages of
703 wxPropertyGridManager (if used).
705 @see GetColumnProportion()
707 bool SetColumnProportion( unsigned int column
, int proportion
);
710 Sets an attribute for this property.
715 Text identifier of attribute. See @ref propgrid_property_attributes.
720 Use wxPG_RECURSE to set the attribute to child properties recursively.
722 @remarks Setting attribute's value to Null variant will simply remove it
723 from property's set of attributes.
725 void SetPropertyAttribute( wxPGPropArg id
, const wxString
& attrName
,
726 wxVariant value
, long argFlags
= 0 );
729 Sets property attribute for all applicapple properties.
730 Be sure to use this method only after all properties have been
733 void SetPropertyAttributeAll( const wxString
& attrName
, wxVariant value
);
736 Sets background colour of a property.
739 Property name or pointer.
742 New background colour.
745 Default is wxPG_RECURSE which causes colour to be set recursively.
746 Omit this flag to only set colour for the property in question
747 and not any of its children.
749 void SetPropertyBackgroundColour( wxPGPropArg id
,
750 const wxColour
& colour
,
751 int flags
= wxPG_RECURSE
);
754 Sets text, bitmap, and colours for given column's cell.
757 - You can set label cell by using column 0.
758 - You can use wxPG_LABEL as text to use default text for column.
760 void SetPropertyCell( wxPGPropArg id
,
762 const wxString
& text
= wxEmptyString
,
763 const wxBitmap
& bitmap
= wxNullBitmap
,
764 const wxColour
& fgCol
= wxNullColour
,
765 const wxColour
& bgCol
= wxNullColour
);
768 Sets client data (void*) of a property.
771 This untyped client data has to be deleted manually.
773 void SetPropertyClientData( wxPGPropArg id
, void* clientData
);
776 Resets text and background colours of given property.
778 void SetPropertyColoursToDefault( wxPGPropArg id
);
781 Sets editor for a property.
786 For builtin editors, use wxPGEditor_X, where X is builtin editor's
787 name (TextCtrl, Choice, etc. see wxPGEditor documentation for full
790 For custom editors, use pointer you received from wxPropertyGrid::RegisterEditorClass().
792 void SetPropertyEditor( wxPGPropArg id
, const wxPGEditor
* editor
);
795 Sets editor control of a property. As editor argument, use
796 editor name string, such as "TextCtrl" or "Choice".
798 void SetPropertyEditor( wxPGPropArg id
, const wxString
& editorName
);
801 Sets label of a property.
804 - Properties under same parent may have same labels. However,
805 property names must still remain unique.
807 void SetPropertyLabel( wxPGPropArg id
, const wxString
& newproplabel
);
810 Sets name of a property.
813 Name or pointer of property which name to change.
816 New name for property.
818 void SetPropertyName( wxPGPropArg id
, const wxString
& newName
);
821 Sets property (and, recursively, its children) to have read-only value.
822 In other words, user cannot change the value in the editor, but they can
826 Property name or pointer.
829 Use @true to enable read-only, @false to disable it.
832 By default changes are applied recursively. Set this parameter
833 wxPG_DONT_RECURSE to prevent this.
835 @remarks This is mainly for use with textctrl editor. Only some other
836 editors fully support it.
838 void SetPropertyReadOnly( wxPGPropArg id
, bool set
= true,
839 int flags
= wxPG_RECURSE
);
842 Sets property's value to unspecified. If it has children (it may be
843 category), then the same thing is done to them.
845 void SetPropertyValueUnspecified( wxPGPropArg id
);
848 Sets property values from a list of wxVariants.
850 void SetPropertyValues( const wxVariantList
& list
,
851 wxPGPropArg defaultCategory
= wxNullProperty
);
854 Sets property values from a list of wxVariants.
856 void SetPropertyValues( const wxVariant
& list
,
857 wxPGPropArg defaultCategory
= wxNullProperty
);
860 Associates the help string with property.
862 @remarks By default, text is shown either in the manager's "description"
863 text box or in the status bar. If extra window style
864 wxPG_EX_HELP_AS_TOOLTIPS is used, then the text will appear as
867 void SetPropertyHelpString( wxPGPropArg id
, const wxString
& helpString
);
870 Set wxBitmap in front of the value.
872 @remarks Bitmap will be scaled to a size returned by
873 wxPropertyGrid::GetImageSize();
875 void SetPropertyImage( wxPGPropArg id
, wxBitmap
& bmp
);
878 Sets max length of property's text.
880 bool SetPropertyMaxLength( wxPGPropArg id
, int maxLen
);
884 Sets text colour of a property.
887 Property name or pointer.
890 New background colour.
893 Default is wxPG_RECURSE which causes colour to be set recursively.
894 Omit this flag to only set colour for the property in question
895 and not any of its children.
897 void SetPropertyTextColour( wxPGPropArg id
,
898 const wxColour
& colour
,
899 int flags
= wxPG_RECURSE
);
902 Sets validator of a property.
904 void SetPropertyValidator( wxPGPropArg id
, const wxValidator
& validator
);
906 /** Sets value (integer) of a property. */
907 void SetPropertyValue( wxPGPropArg id
, long value
);
909 /** Sets value (integer) of a property. */
910 void SetPropertyValue( wxPGPropArg id
, int value
);
912 /** Sets value (floating point) of a property. */
913 void SetPropertyValue( wxPGPropArg id
, double value
);
915 /** Sets value (bool) of a property. */
916 void SetPropertyValue( wxPGPropArg id
, bool value
);
918 /** Sets value (string) of a property. */
919 void SetPropertyValue( wxPGPropArg id
, const wxString
& value
);
921 /** Sets value (wxArrayString) of a property. */
922 void SetPropertyValue( wxPGPropArg id
, const wxArrayString
& value
);
924 /** Sets value (wxDateTime) of a property. */
925 void SetPropertyValue( wxPGPropArg id
, const wxDateTime
& value
);
927 /** Sets value (wxObject*) of a property. */
928 void SetPropertyValue( wxPGPropArg id
, wxObject
* value
);
930 /** Sets value (wxObject&) of a property. */
931 void SetPropertyValue( wxPGPropArg id
, wxObject
& value
);
933 /** Sets value (native 64-bit int) of a property. */
934 void SetPropertyValue( wxPGPropArg id
, wxLongLong_t value
);
936 /** Sets value (native 64-bit unsigned int) of a property. */
937 void SetPropertyValue( wxPGPropArg id
, wxULongLong_t value
);
939 /** Sets value (wxArrayInt&) of a property. */
940 void SetPropertyValue( wxPGPropArg id
, const wxArrayInt
& value
);
943 Sets value (wxString) of a property.
945 @remarks This method uses wxPGProperty::SetValueFromString(), which all
946 properties should implement. This means that there should not be
947 a type error, and instead the string is converted to property's
950 void SetPropertyValueString( wxPGPropArg id
, const wxString
& value
);
953 Sets value (wxVariant&) of a property.
955 @remarks Use wxPropertyGrid::ChangePropertyValue() instead if you need to
956 run through validation process and send property change event.
958 void SetPropertyValue( wxPGPropArg id
, wxVariant value
);
961 Adjusts how wxPropertyGrid behaves when invalid value is entered
965 See @ref propgrid_vfbflags for possible values.
967 void SetValidationFailureBehavior( int vfbFlags
);
970 Sorts all properties recursively.
973 This can contain any of the following options:
974 wxPG_SORT_TOP_LEVEL_ONLY: Only sort categories and their
975 immediate children. Sorting done by wxPG_AUTO_SORT option
978 @see SortChildren, wxPropertyGrid::SetSortFunction
980 void Sort( int flags
= 0 );
983 Sorts children of a property.
986 Name or pointer to a property.
989 This can contain any of the following options:
990 wxPG_RECURSE: Sorts recursively.
992 @see Sort, wxPropertyGrid::SetSortFunction
994 void SortChildren( wxPGPropArg id
, int flags
= 0 );
997 Returns editor pointer of editor with given name;
999 static wxPGEditor
* GetEditorByName( const wxString
& editorName
);