// This define is necessary to prevent macro clearing
#define __wxPG_SOURCE_FILE__
-#include <wx/propgrid/propgrid.h>
+#include "wx/propgrid/propgrid.h"
-#include <wx/propgrid/manager.h>
+#include "wx/propgrid/manager.h"
#define wxPG_MAN_ALTERNATE_BASE_ID 11249 // Needed for wxID_ANY madnesss
// wxPropertyGridManager
// -----------------------------------------------------------------------
-const wxChar *wxPropertyGridManagerNameStr = wxT("wxPropertyGridManager");
+const char wxPropertyGridManagerNameStr[] = "wxPropertyGridManager";
// Categoric Mode Icon
const wxPoint& pos,
const wxSize& size,
long style,
- const wxChar* name )
+ const wxString& name )
: wxPanel()
{
Init1();
const wxPoint& pos,
const wxSize& size,
long style,
- const wxChar* name )
+ const wxString& name )
{
bool res = wxPanel::Create( parent, id, pos, size,
#ifdef __WXMAC__
// Smaller controls on Mac
SetWindowVariant(wxWINDOW_VARIANT_SMALL);
-#endif
+#endif
// Create propertygrid.
m_pPropGrid->Create(this,baseId,wxPoint(0,0),csz,
(style&wxPG_MAN_PASS_FLAGS_MASK) );
// Need to re-position windows?
- if ( (oldWindowStyle & (wxPG_TOOLBAR|wxPG_DESCRIPTION)) !=
+ if ( (oldWindowStyle & (wxPG_TOOLBAR|wxPG_DESCRIPTION)) !=
(style & (wxPG_TOOLBAR|wxPG_DESCRIPTION)) )
{
RecreateControls();
wxEmptyString,wxDefaultPosition,wxDefaultSize,wxALIGN_LEFT|wxST_NO_AUTORESIZE);
m_pTxtHelpContent->SetCursor ( *wxSTANDARD_CURSOR );
}
+
+ SetDescribedProperty(GetSelection());
}
else
{
{
// Categorized mode.
if ( m_pPropGrid->m_windowStyle & wxPG_HIDE_CATEGORIES )
+ {
+ if ( !m_pPropGrid->HasInternalFlag(wxPG_FL_CATMODE_AUTO_SORT) )
+ m_pPropGrid->m_windowStyle &= ~wxPG_AUTO_SORT;
m_pPropGrid->EnableCategories( true );
+ }
}
else if ( id == ( baseId + ID_ADVTBITEMSBASE_OFFSET + 1 ) )
{
// Alphabetic mode.
if ( !(m_pPropGrid->m_windowStyle & wxPG_HIDE_CATEGORIES) )
+ {
+ if ( m_pPropGrid->HasFlag(wxPG_AUTO_SORT) )
+ m_pPropGrid->SetInternalFlag(wxPG_FL_CATMODE_AUTO_SORT);
+ else
+ m_pPropGrid->ClearInternalFlag(wxPG_FL_CATMODE_AUTO_SORT);
+
+ m_pPropGrid->m_windowStyle |= wxPG_AUTO_SORT;
m_pPropGrid->EnableCategories( false );
+ }
}
else
{