Like wx.propgrid.LongStringProperty, but the button triggers dir selector instead.
Supported special attributes:
__init__ |
|
DoGetValidator |
Returns pointer to the wx.Validator that should be used with the editor of this property (None for no validator). |
DoSetAttribute |
Reimplement this member function to add special handling for attributes of this property. |
OnButtonClick |
wx.propgrid.
DirProperty
(LongStringProperty)¶Possible constructors:
DirProperty(name=PG_LABEL, label=PG_LABEL, value="")
Like LongStringProperty, but the button triggers dir selector instead.
__init__
(self, name=PG_LABEL, label=PG_LABEL, value="")¶Parameters: |
|
---|
DoGetValidator
(self)¶Returns pointer to the wx.Validator that should be used with the editor of this property (None
for no validator).
Setting validator explicitly via SetPropertyValidator will override this.
In most situations, code like this should work well (macros are used to maintain one actual validator instance, so on the second call the function exits within the first macro):
class MyPropertyClass(wx.propgrid.DirProperty):
...
def DoGetValidator(self):
validator = MyValidator(...)
... prepare validator...
return validator
Return type: | Validator |
---|
Note
You can get common filename validator by returning wx.propgrid.FileProperty.GetClassValidator
. wx.propgrid.DirProperty, for example, uses it.
DoSetAttribute
(self, name, value)¶Reimplement this member function to add special handling for attributes of this property.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | Return |
Note
To actually set property attribute values from the application, use wx.propgrid.PGProperty.SetAttribute
instead.
OnButtonClick
(self, propGrid, value)¶Parameters: |
|
---|---|
Return type: | tuple |
Returns: | ( bool, value ) |