Link to home
Start Free TrialLog in
Avatar of MooreJ
MooreJ

asked on

Right Aligning Text in a CListView

I can Right Align Text in a CListCtrl but when I try to do it in the CListView only the headers get Right Aligned.  All the data is still left Aligned.
Avatar of RONSLOW
RONSLOW

Eh? what do you mean "in a CCtrlView" - CCtrlView is a base class (and not usable as such) for views which are a single control (like CListView).

Did you mean it worked ok for CListCtrl and not CListView???

Avatar of MooreJ

ASKER

OK... I can't type.  I was having a bad day.  Yes I meant to say:
I can right align in a CListCtrl.  But when I try it in a CListView it only aligns the Headers.

Avatar of MooreJ

ASKER

Edited text of question
You should get the list control reference from the view,
with:
CListCtrl& GetListCtrl( ) const; of the CListView object.

and apply it with the following:

InsertColumn(...,..,  LVCFMT_RIGHT);
Avatar of MooreJ

ASKER

I Know that.  But when I do it from a CListView IT ONLY ALIGNS THE HEADERS!!! Refer to my Question.
ASKER CERTIFIED SOLUTION
Avatar of gelbert
gelbert

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MooreJ

ASKER

Perfect example.... I was able to cut/paste to my app...