﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Listview:Right align the 1st column</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Wed, 27 May 2026 08:29:07 GMT</lastBuildDate><ttl>20</ttl><item><title>Listview:Right align the 1st column</title><link>http://forum.strataframe.net/FindPost20978.aspx</link><description>Hi,&lt;P&gt;I need to right align the 1st column of a listview, where data are Integer.&lt;BR&gt;I understand that these integer are "mapped" to text for displaying in the listview, but why is it impossible to set alignment to right &lt;STRONG&gt;on the first column&lt;/STRONG&gt; (and only the first, alignment works fine on other columns)&lt;BR&gt;either in property sheet or in ListPopulating event, it does not work.&lt;/P&gt;&lt;P&gt;As a workaround, I set the format to D5, but the readability is poor. What do I forget? How could I right align, or PADL with spaces?&lt;P&gt;thanks</description><pubDate>Wed, 03 Dec 2008 10:04:41 GMT</pubDate><dc:creator>Michel Levy</dc:creator></item><item><title>RE: Listview:Right align the 1st column</title><link>http://forum.strataframe.net/FindPost20990.aspx</link><description>Eddy,&lt;P&gt;Of course, you are right, I'll add a dummy column :w00t:&lt;/P&gt;&lt;P&gt;Thanks a lot...&lt;/P&gt;&lt;P&gt;Trent,&lt;/P&gt;&lt;P&gt;I could not believe it was simply a "bug by design" from MS :doze:</description><pubDate>Wed, 03 Dec 2008 10:04:41 GMT</pubDate><dc:creator>Michel Levy</dc:creator></item><item><title>RE: Listview:Right align the 1st column</title><link>http://forum.strataframe.net/FindPost20989.aspx</link><description>Edhy hit on the workaround already. Just add a 0 width column and make sure it is the topmost column in your columns collection. See the attachments for an illustration on how to configure the columns and proof that it works :).&lt;/P&gt;&lt;P&gt;As Trent said, this is behavior that has been inherited from the standard Microsoft ListView. The first column added to the column's collection cannot be set to right aligned via the property sheet, and the topmost column in the collection (whether it was the first column created or not) will always be left aligned regardless of what the alignment property is set to. I have no idea why they do it that way, but until we have our own listview that doesn't inherit from Microsoft's, we are going to have to work around it :w00t:.</description><pubDate>Wed, 03 Dec 2008 10:03:33 GMT</pubDate><dc:creator>Dustin Taylor</dc:creator></item><item><title>RE: Listview:Right align the 1st column</title><link>http://forum.strataframe.net/FindPost20982.aspx</link><description>[quote]I believe there should be some technical explanation as to why the first column can not be aligned to the right.[/quote]&lt;/P&gt;&lt;P&gt;Yes, but it wil have to come from Microsoft! :)&amp;nbsp; Our ListView inherits from the standard .NET ListView. This will change in future releases so that we have 100% control over things just like this.&amp;nbsp; Dustin will post a workaround shortly.</description><pubDate>Wed, 03 Dec 2008 09:51:17 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Listview:Right align the 1st column</title><link>http://forum.strataframe.net/FindPost20981.aspx</link><description>Hi Michael,&lt;/P&gt;&lt;P&gt;Maybe you can have a dummy fist column (Index 0)&amp;nbsp;with 0 width and not header, then have the real column (Index 1) which will hold your integer and can get the alignment to the right with no problem.&lt;/P&gt;&lt;P&gt;I believe there should be some technical explanation as to why the first column can not be aligned to the right.</description><pubDate>Wed, 03 Dec 2008 09:46:25 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>