Added sort order and alignement for column headers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1527,6 +1527,29 @@ void wxDataViewColumn::SetBitmap( const wxBitmap &bitmap )
|
||||
}
|
||||
}
|
||||
|
||||
void wxDataViewColumn::SetAlignment( wxAlignment align )
|
||||
{
|
||||
GtkTreeViewColumn *column = (GtkTreeViewColumn *)m_column;
|
||||
|
||||
gfloat xalign = 0.0;
|
||||
if (align == wxALIGN_RIGHT)
|
||||
xalign = 1.0;
|
||||
if (align == wxALIGN_CENTER)
|
||||
xalign = 0.5;
|
||||
|
||||
gtk_tree_view_column_set_alignment( column, xalign );
|
||||
}
|
||||
|
||||
void wxDataViewColumn::SetSortOrder( bool ascending )
|
||||
{
|
||||
GtkTreeViewColumn *column = (GtkTreeViewColumn *)m_column;
|
||||
|
||||
if (ascending)
|
||||
gtk_tree_view_column_set_sort_order( column, GTK_SORT_ASCENDING );
|
||||
else
|
||||
gtk_tree_view_column_set_sort_order( column, GTK_SORT_DESCENDING );
|
||||
}
|
||||
|
||||
int wxDataViewColumn::GetWidth()
|
||||
{
|
||||
return gtk_tree_view_column_get_width( (GtkTreeViewColumn *)m_column );
|
||||
|
Reference in New Issue
Block a user