Added nominal wxPG_PROP_READONLY support for editor controls other than wxTextCtrl-based ones

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63337 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2010-01-31 18:15:17 +00:00
parent 8669431add
commit c05fe84146
3 changed files with 15 additions and 4 deletions

View File

@@ -983,6 +983,12 @@ wxWindow* wxPGChoiceEditor::CreateControlsBase( wxPropertyGrid* propGrid,
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();
@@ -1577,6 +1583,9 @@ wxPGWindowList wxPGCheckBoxEditor::CreateControls( wxPropertyGrid* propGrid,
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;