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:
@@ -582,6 +582,7 @@ class wxListCtrl: public wxControl
|
|||||||
bool Arrange( int flag = wxLIST_ALIGN_DEFAULT ); // always wxLIST_ALIGN_LEFT in wxGLC
|
bool Arrange( int flag = wxLIST_ALIGN_DEFAULT ); // always wxLIST_ALIGN_LEFT in wxGLC
|
||||||
bool DeleteItem( long item );
|
bool DeleteItem( long item );
|
||||||
bool DeleteAllItems(void) ;
|
bool DeleteAllItems(void) ;
|
||||||
|
void DeleteAllColumns(void) ;
|
||||||
bool DeleteColumn( int col );
|
bool DeleteColumn( int col );
|
||||||
// wxText& Edit(long item) ; // not supported in wxGLC
|
// wxText& Edit(long item) ; // not supported in wxGLC
|
||||||
bool EnsureVisible( long item );
|
bool EnsureVisible( long item );
|
||||||
|
@@ -1997,6 +1997,9 @@ void wxListMainWindow::DeleteItem( long index )
|
|||||||
|
|
||||||
void wxListMainWindow::DeleteColumn( int col )
|
void wxListMainWindow::DeleteColumn( int col )
|
||||||
{
|
{
|
||||||
|
wxCHECK_RET( col < m_columns.GetCount(),
|
||||||
|
"attempting to delete inexistent column in wxListView" );
|
||||||
|
|
||||||
m_dirty = TRUE;
|
m_dirty = TRUE;
|
||||||
wxNode *node = m_columns.Nth( col );
|
wxNode *node = m_columns.Nth( col );
|
||||||
if (node) m_columns.DeleteNode( node );
|
if (node) m_columns.DeleteNode( node );
|
||||||
@@ -2543,6 +2546,12 @@ bool wxListCtrl::DeleteAllItems(void)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxListCtrl::DeleteAllColumns()
|
||||||
|
{
|
||||||
|
for ( size_t n = 0; n < m_mainWin->m_columns.GetCount(); n++ )
|
||||||
|
DeleteColumn(n);
|
||||||
|
}
|
||||||
|
|
||||||
bool wxListCtrl::DeleteColumn( int col )
|
bool wxListCtrl::DeleteColumn( int col )
|
||||||
{
|
{
|
||||||
m_mainWin->DeleteColumn( col );
|
m_mainWin->DeleteColumn( col );
|
||||||
|
Reference in New Issue
Block a user