// Categoric Mode Icon
-static const char* gs_xpm_catmode[] = {
+static const char* const gs_xpm_catmode[] = {
"16 16 5 1",
". c none",
"B c black",
};
// Alphabetic Mode Icon
-static const char* gs_xpm_noncatmode[] = {
+static const char* const gs_xpm_noncatmode[] = {
"16 16 5 1",
". c none",
"B c black",
};
// Default Page Icon.
-static const char* gs_xpm_defpage[] = {
+static const char* const gs_xpm_defpage[] = {
"16 16 5 1",
". c none",
"B c black",
pageObj->m_id = m_nextTbInd;
+ if ( !HasFlag(wxPG_SPLITTER_AUTO_CENTER) )
+ pageObj->m_dontCenterSplitter = true;
+
if ( isPageInserted )
m_arrPages.push_back( pageObj );
m_pToolbar->AddTool(m_nextTbInd,label,bmp,label,wxITEM_RADIO);
//m_pToolbar->InsertTool(index+3,m_nextTbInd,bmp);
else
- m_pToolbar->AddTool(m_nextTbInd,label,wxBitmap( (const char**)gs_xpm_defpage ),
+ m_pToolbar->AddTool(m_nextTbInd,label,wxBitmap(gs_xpm_defpage),
label,wxITEM_RADIO);
m_nextTbInd++;
wxString desc1(_("Categorized Mode"));
wxString desc2(_("Alphabetic Mode"));
m_pToolbar->AddTool(baseId+ID_ADVTBITEMSBASE_OFFSET+0,
- desc1,wxBitmap ( (const char**)gs_xpm_catmode ),
+ desc1,wxBitmap (gs_xpm_catmode),
desc1,wxITEM_RADIO);
m_pToolbar->AddTool(baseId+ID_ADVTBITEMSBASE_OFFSET+1,
- desc2,wxBitmap ( (const char**)gs_xpm_noncatmode ),
+ desc2,wxBitmap (gs_xpm_noncatmode),
desc2,wxITEM_RADIO);
m_pToolbar->Realize();
}
maxW += m_pPropGrid->m_marginWidth;
if ( maxW > highest )
highest = maxW;
+ m_pState->m_dontCenterSplitter = true;
}
if ( highest > 0 )
m_pPropGrid->SetSplitterPosition( highest );
-
- m_pPropGrid->m_iFlags |= wxPG_FL_DONT_CENTER_SPLITTER;
}
}
{
int width, height;
- GetClientSize(&width,&height);
+ GetClientSize(&width, &height);
if ( m_width == -12345 )
RecreateControls();
- RecalculatePositions(width,height);
+ RecalculatePositions(width, height);
+
+ if ( m_pPropGrid && m_pPropGrid->m_parent )
+ {
+ int pgWidth, pgHeight;
+ m_pPropGrid->GetClientSize(&pgWidth, &pgHeight);
+
+ // Regenerate splitter positions for non-current pages
+ for ( unsigned int i=0; i<GetPageCount(); i++ )
+ {
+ wxPropertyGridPage* page = GetPage(i);
+ if ( page != m_pPropGrid->GetState() )
+ {
+ page->OnClientWidthChange(pgWidth,
+ pgWidth - page->m_width,
+ true);
+ }
+ }
+ }
}
// -----------------------------------------------------------------------
{
wxPropertyGridPage* page = GetPage(i);
page->DoSetSplitterPosition( pos, splitterColumn, false );
+ page->m_isSplitterPreSet = true;
}
-
- m_pPropGrid->SetInternalFlag(wxPG_FL_SPLITTER_PRE_SET);
}
// -----------------------------------------------------------------------