A few more things are back to work.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-05-10 13:31:50 +00:00
parent 1a89d2f4fb
commit 121a3581d3
12 changed files with 141 additions and 176 deletions

View File

@@ -2372,39 +2372,40 @@ void wxListCtrl::SetSingleStyle( long style, bool add )
void wxListCtrl::SetWindowStyleFlag( long flag )
{
m_mainWin->DeleteEverything();
int width = 0;
int height = 0;
GetClientSize( &width, &height );
m_mainWin->SetMode( flag );
if (flag & wxLC_REPORT)
if (m_mainWin)
{
if (!HasFlag(wxLC_REPORT))
m_mainWin->DeleteEverything();
int width = 0;
int height = 0;
GetClientSize( &width, &height );
m_mainWin->SetMode( flag );
if (flag & wxLC_REPORT)
{
// m_mainWin->SetSize( 0, 24, width, height-24 );
if (!m_headerWin)
if (!HasFlag(wxLC_REPORT))
{
m_headerWin = new wxListHeaderWindow( this, -1, m_mainWin, wxPoint(0,0), wxSize(width,23), wxTAB_TRAVERSAL );
}
else
{
// m_headerWin->SetSize( 0, 0, width, 23 );
m_headerWin->Show( TRUE );
if (!m_headerWin)
{
m_headerWin = new wxListHeaderWindow( this, -1, m_mainWin,
wxPoint(0,0), wxSize(width,23), wxTAB_TRAVERSAL );
}
else
{
m_headerWin->Show( TRUE );
}
}
}
}
else
{
if (HasFlag(wxLC_REPORT))
else
{
// m_mainWin->SetSize( 0, 0, width, height );
m_headerWin->Show( FALSE );
}
if (HasFlag(wxLC_REPORT))
{
m_headerWin->Show( FALSE );
}
}
}
wxWindow::SetWindowStyleFlag( flag );
}