Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Right Align Column in ListView 6.0 / SP4?
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00426701
Message ID:
00462118
Views:
32
>I thought I tried that, and that it anly affected the text in the column header (and not so much the contents of the column). I'll try it again though.
>Thanks
>
>
>>>Other than using a fixed pitch font, is there any method to right justify text in the Ms ListView 6 (similar to the the way the 'file size') appears in Explorer. There are also those liitle dots ('...') that appear when the LV control thinks the column with is too narrow.
>>>AHA:
>>>Terry
>>
>>Terry,
>>
>>When you create the column headers you can specify the alignment.
>>
>>oColumnHeader = oListView.ColumnHeaders.Add(Index, Key, Text, Width, Alignment)
>>
>>Alignment is either: 0 - Left, 1 - Right, 2 - Center
>>
>>Dan

I've got another problem with aligning columns.
I want to reflect the sortorder of the listview-items with an arrow-image in he header (like Windows Explorer).

By setting the appropriate properties in the ColumnClick method of the columnheader-object (as described in the listview example from MSDN) this is working fine, but:

As soon as the icon-property ever got assigned a value, the listview-items are always aligned to the left side (even if the alignment-property is set to 1 or 2). This happens also when the icon property is set to 0.

The alignment works only as expected when creating the headers and (sub)items whith the add-method without assigning an icon-index.

Question:
Has anyone else experience with this problem and, more important, a solution/work-around.

Very long Jan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform