// Created: 2008-08-24
// RCS-ID: $Id$
// Copyright: (c) Jaakko Salli
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
return iface->GetPropertyByNameA(*m_ptr.stringName);
else if ( m_flags & IsCharPtr )
return iface->GetPropertyByNameA(m_ptr.charName);
-#if wxUSE_WCHAR_T
else if ( m_flags & IsWCharPtr )
return iface->GetPropertyByNameA(m_ptr.wcharName);
-#endif
return NULL;
}
state->DoDelete( p, false );
- // Mark the property as 'unattached'
- p->m_parentState = NULL;
- p->m_parent = NULL;
-
RefreshGrid(state);
return p;
grid->DoSelectProperty( p, wxPG_SEL_FORCE );
}
- state->DoEnableProperty(p, enable);
+ p->DoEnable(enable);
RefreshProperty( p );
GetPropertyGrid()->RefreshEditor();
}
+bool wxPropertyGridInterface::SetColumnProportion( unsigned int column,
+ int proportion )
+{
+ wxCHECK(m_pState, false);
+ wxPropertyGrid* pg = m_pState->GetGrid();
+ wxCHECK(pg, false);
+ wxCHECK(pg->HasFlag(wxPG_SPLITTER_AUTO_CENTER), false);
+ m_pState->DoSetColumnProportion(column, proportion);
+ return true;
+}
+
// -----------------------------------------------------------------------
// wxPropertyGridInterface property value setting and getting
// -----------------------------------------------------------------------
{
wxPropertyGrid* pg = GetPropertyGrid();
- pg->DoClearSelection();
-
unsigned int pageIndex = 0;
for (;;)
page->DoSort(flags);
pageIndex++;
}
+
+ // Fix positions of any open editor controls
+ if ( pg )
+ pg->CorrectEditorWidgetPosY();
}
// -----------------------------------------------------------------------
wxPG_PROP_ARG_CALL_PROLOG()
wxPGCell& cell = p->GetCell(column);
- if ( text.length() && text != wxPG_LABEL )
+ if ( !text.empty() && text != wxPG_LABEL )
cell.SetText(text);
if ( bitmap.IsOk() )
cell.SetBitmap(bitmap);
}
// Remove last '|'
- if ( result.length() )
+ if ( !result.empty() )
result.RemoveLast();
return result;
{
if ( pageState->IsDisplayed() )
{
- if ( values[0].length() )
+ if ( !values[0].empty() )
newSelection = GetPropertyByName(value);
pgSelectionSet = true;
}
else
{
- if ( values[0].length() )
+ if ( !values[0].empty() )
pageState->DoSetSelection(GetPropertyByName(value));
else
pageState->DoClearSelection();