*/
wxPG_PROP_MISC_PARENT = 0x4000,
-/** Property is read-only. Editor is still created.
+/** Property is read-only. Editor is still created for wxTextCtrl-based
+ property editors. For others, editor is not usually created because
+ they do implement wxTE_READONLY style or equivalent.
*/
wxPG_PROP_READONLY = 0x8000,
In other words, user cannot change the value in the editor, but they can
still copy it.
- @remarks This is mainly for use with textctrl editor. Only some other
- editors fully support it.
-
@param id
Property name or pointer.
@param flags
By default changes are applied recursively. Set this parameter
wxPG_DONT_RECURSE to prevent this.
+
+ @remarks This is mainly for use with textctrl editor. Only some other
+ editors fully support it.
*/
void SetPropertyReadOnly( wxPGPropArg id, bool set = true,
int flags = wxPG_RECURSE );
const wxSize& sz,
long extraStyle ) const
{
+ // Since it is not possible (yet) to create a read-only combo box in
+ // the same sense that wxTextCtrl is read-only, simply do not create
+ // the control in this case.
+ if ( property->HasFlag(wxPG_PROP_READONLY) )
+ return NULL;
+
const wxPGChoices& choices = property->GetChoices();
wxString defString;
int index = property->GetChoiceSelection();
const wxPoint& pos,
const wxSize& size ) const
{
+ if ( property->HasFlag(wxPG_PROP_READONLY) )
+ return NULL;
+
wxPoint pt = pos;
pt.x -= wxPG_XBEFOREWIDGET;
wxSize sz = size;