git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62955
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
+ /**
+ Returns (visual) text representation of the unspecified
+ property value.
+
+ @param argFlags For internal use only.
+ */
+ wxString GetUnspecifiedValueText( int argFlags = 0 ) const;
+
/** Set virtual width for this particular page. Width -1 indicates that the
virtual width should be disabled. */
void SetVirtualWidth( int width );
/** Set virtual width for this particular page. Width -1 indicates that the
virtual width should be disabled. */
void SetVirtualWidth( int width );
*/
wxTextCtrl* GetEditorTextCtrl() const;
*/
wxTextCtrl* GetEditorTextCtrl() const;
+ /**
+ Returns (visual) text representation of the unspecified
+ property value.
+
+ @param argFlags For internal use only.
+ */
+ wxString GetUnspecifiedValueText( int argFlags = 0 ) const;
+
/**
Returns current vertical spacing.
*/
/**
Returns current vertical spacing.
*/
{
if ( !property->IsValueUnspecified() )
dc.DrawText( text, rect.x+wxPG_XBEFORETEXT, rect.y );
{
if ( !property->IsValueUnspecified() )
dc.DrawText( text, rect.x+wxPG_XBEFORETEXT, rect.y );
+ else
+ dc.DrawText( property->GetGrid()->GetUnspecifiedValueText(),
+ rect.x+wxPG_XBEFORETEXT, rect.y );
}
bool wxPGEditor::GetValueFromControl( wxVariant&, wxPGProperty*, wxWindow* ) const
}
bool wxPGEditor::GetValueFromControl( wxVariant&, wxPGProperty*, wxWindow* ) const
property->GetChildCount() )
return NULL;
property->GetChildCount() )
return NULL;
- if ( !property->IsValueUnspecified() )
- text = property->GetValueAsString(property->HasFlag(wxPG_PROP_READONLY) ?
- 0 : wxPG_EDITABLE_VALUE);
+ int argFlags = property->HasFlag(wxPG_PROP_READONLY) ?
+ 0 : wxPG_EDITABLE_VALUE;
+ text = property->GetValueAsString(argFlags);
int flags = 0;
if ( (property->GetFlags() & wxPG_PROP_PASSWORD) &&
int flags = 0;
if ( (property->GetFlags() & wxPG_PROP_PASSWORD) &&
wxASSERT(pg); // Really, property grid should exist if editor does
if ( pg )
{
wxASSERT(pg); // Really, property grid should exist if editor does
if ( pg )
{
- wxString unspecValueText;
+ wxString unspecValueText = pg->GetUnspecifiedValueText();
pg->SetupTextCtrlValue(unspecValueText);
tc->SetValue(unspecValueText);
}
pg->SetupTextCtrlValue(unspecValueText);
tc->SetValue(unspecValueText);
}
if ( !cb->HasFlag(wxCB_READONLY) )
{
wxString unspecValueText;
if ( !cb->HasFlag(wxCB_READONLY) )
{
wxString unspecValueText;
+ unspecValueText = propGrid->GetUnspecifiedValueText();
propGrid->SetupTextCtrlValue(unspecValueText);
cb->GetTextCtrl()->SetValue(unspecValueText);
}
propGrid->SetupTextCtrlValue(unspecValueText);
cb->GetTextCtrl()->SetValue(unspecValueText);
}
-void wxPGChoiceEditor::SetValueToUnspecified( wxPGProperty* WXUNUSED(property), wxWindow* ctrl ) const
+void wxPGChoiceEditor::SetValueToUnspecified( wxPGProperty* property,
+ wxWindow* ctrl ) const
{
wxOwnerDrawnComboBox* cb = (wxOwnerDrawnComboBox*)ctrl;
{
wxOwnerDrawnComboBox* cb = (wxOwnerDrawnComboBox*)ctrl;
+
+ if ( !cb->HasFlag(wxCB_READONLY) )
+ {
+ wxPropertyGrid* pg = property->GetGrid();
+ if ( pg )
+ {
+ wxString tcText = pg->GetUnspecifiedValueText();
+ pg->SetupTextCtrlValue(tcText);
+ cb->SetValue(tcText);
+ }
+ }
+ else
+ {
+ cb->SetSelection(-1);
+ }
+ wxPropertyGrid* pg = GetGrid();
+
if ( IsValueUnspecified() )
if ( IsValueUnspecified() )
+ return pg->GetUnspecifiedValueText(argFlags);
if ( m_commonValue == -1 )
{
if ( m_commonValue == -1 )
{
//
// Return common value's string representation
//
// Return common value's string representation
- wxPropertyGrid* pg = GetGrid();
const wxPGCommonValue* cv = pg->GetCommonValue(m_commonValue);
if ( argFlags & wxPG_FULL_VALUE )
const wxPGCommonValue* cv = pg->GetCommonValue(m_commonValue);
if ( argFlags & wxPG_FULL_VALUE )
+wxString
+wxPropertyGrid::GetUnspecifiedValueText( int WXUNUSED(argFlags) ) const
+{
+ return wxEmptyString;
+}
+
// -----------------------------------------------------------------------
// wxPropertyGrid property selection, editor creation
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
// wxPropertyGrid property selection, editor creation
// -----------------------------------------------------------------------