wxDataViewCtrl column alignment

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Dark_Phoenix
Knows some wx things
Knows some wx things
Posts: 48
Joined: Sat Jul 04, 2009 2:27 pm
Location: Houston, TX

wxDataViewCtrl column alignment

Post by Dark_Phoenix » Sat Feb 13, 2010 1:42 pm

Is there any way to set the alignment of the actual data (not the header title) in each column under wxMsw? Right now all the data in the control is centered in each cell and I need to have it left justified.

gundam2nd
In need of some credit
In need of some credit
Posts: 2
Joined: Tue Oct 31, 2006 9:48 am

Post by gundam2nd » Wed Feb 24, 2010 3:28 pm

In wxMSW current trunk you could achieve left alignment with this code:

wxDataViewColumn *column0 = new wxDataViewColumn( "title", tr, 0, 200, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE );

just as the 'dataview' sample does.

Greetings,

Post Reply