Added InsertColumn( pos, col ), some reformating

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2008-05-21 08:47:21 +00:00
parent 47e1c61bb7
commit 19723525ce
9 changed files with 189 additions and 172 deletions

View File

@@ -3783,6 +3783,28 @@ bool wxDataViewCtrl::PrependColumn( wxDataViewColumn *col )
return true;
}
bool wxDataViewCtrl::InsertColumn( unsigned int pos, wxDataViewColumn *col )
{
if (!wxDataViewCtrlBase::InsertColumn(pos,col))
return false;
m_cols.Insert( pos, col );
#ifdef __WXGTK26__
if (!gtk_check_version(2,6,0))
{
if (gtk_tree_view_column_get_sizing( GTK_TREE_VIEW_COLUMN(col->GetGtkHandle()) ) !=
GTK_TREE_VIEW_COLUMN_FIXED)
gtk_tree_view_set_fixed_height_mode( GTK_TREE_VIEW(m_treeview), FALSE );
}
#endif
gtk_tree_view_insert_column( GTK_TREE_VIEW(m_treeview),
GTK_TREE_VIEW_COLUMN(col->GetGtkHandle()), pos );
return true;
}
unsigned int wxDataViewCtrl::GetColumnCount() const
{
return m_cols.GetCount();