added wxListCtrl::DeleteAllColumns()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 1998-12-02 20:06:14 +00:00
parent a724d7892d
commit bd8289c14d
2 changed files with 175 additions and 165 deletions

View File

@ -582,6 +582,7 @@ class wxListCtrl: public wxControl
bool Arrange( int flag = wxLIST_ALIGN_DEFAULT ); // always wxLIST_ALIGN_LEFT in wxGLC
bool DeleteItem( long item );
bool DeleteAllItems(void) ;
void DeleteAllColumns(void) ;
bool DeleteColumn( int col );
// wxText& Edit(long item) ; // not supported in wxGLC
bool EnsureVisible( long item );

View File

@ -1997,6 +1997,9 @@ void wxListMainWindow::DeleteItem( long index )
void wxListMainWindow::DeleteColumn( int col )
{
wxCHECK_RET( col < m_columns.GetCount(),
"attempting to delete inexistent column in wxListView" );
m_dirty = TRUE;
wxNode *node = m_columns.Nth( col );
if (node) m_columns.DeleteNode( node );
@ -2543,6 +2546,12 @@ bool wxListCtrl::DeleteAllItems(void)
return TRUE;
}
void wxListCtrl::DeleteAllColumns()
{
for ( size_t n = 0; n < m_mainWin->m_columns.GetCount(); n++ )
DeleteColumn(n);
}
bool wxListCtrl::DeleteColumn( int col )
{
m_mainWin->DeleteColumn( col );