﻿<?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?)  » Resizing listview column at run time</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Fri, 12 Jun 2026 17:24:57 GMT</lastBuildDate><ttl>20</ttl><item><title>Resizing listview column at run time</title><link>http://forum.strataframe.net/FindPost30975.aspx</link><description>I have a column in a listview ( not a Stratalistview )&amp;nbsp; that may not be relevant depending on how I pull the data.&amp;nbsp; If not, I would like to set its width to 0.&lt;br/&gt;&lt;br/&gt;I thought I could say&lt;br/&gt;&lt;br/&gt;this.lvCompare.Columns["colMyCol"].Width = 0;&lt;br/&gt;&lt;br/&gt;but it tells me it is not set to an instance of an object.&amp;nbsp; I tried it after the requery but no luck&lt;br/&gt;&lt;br/&gt;In debugger I see no properties exposed at all on the columns collection.&amp;nbsp; &lt;br/&gt;&lt;br/&gt;What's the trick.?&amp;nbsp;&amp;nbsp; Anyone have an example of how to do this?&amp;nbsp; &lt;br/&gt;&lt;br/&gt;( remember, traditional SF listview,not Stratalistview )&lt;br/&gt;&lt;br/&gt;TIA</description><pubDate>Thu, 23 Feb 2012 10:28:10 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>RE: Resizing listview column at run time</title><link>http://forum.strataframe.net/FindPost30981.aspx</link><description>Glad to hear that! &lt;span&gt;:cool:&lt;/span&gt;</description><pubDate>Thu, 23 Feb 2012 10:28:10 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Resizing listview column at run time</title><link>http://forum.strataframe.net/FindPost30980.aspx</link><description>Using index worked great !&amp;nbsp; </description><pubDate>Thu, 23 Feb 2012 09:44:46 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>RE: Resizing listview column at run time</title><link>http://forum.strataframe.net/FindPost30979.aspx</link><description>De nada. &lt;span&gt;;)&lt;/span&gt;</description><pubDate>Thu, 23 Feb 2012 05:49:47 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Resizing listview column at run time</title><link>http://forum.strataframe.net/FindPost30978.aspx</link><description>Obrigado, Ivan.&amp;nbsp; I'll try that.&amp;nbsp; Saw an overload for the columnheader and thought i could get away with that.&amp;nbsp; &lt;br/&gt;&lt;br/&gt;If index works that will be fine.</description><pubDate>Wed, 22 Feb 2012 17:32:30 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>RE: Resizing listview column at run time</title><link>http://forum.strataframe.net/FindPost30977.aspx</link><description>Try using its index position:&lt;br/&gt;&lt;br/&gt;&lt;span&gt;[codesnippet]&lt;/span&gt;&lt;span id="ctl00_ctlContentPlaceHolder_ctl00_ctlTopic_ctlPanelBar_ctlTopicsRepeater_ctl01_lblFullMessage"&gt;this.lvCompare.Columns[1].Width = 0;&lt;/span&gt;&lt;span&gt;[/codesnippet]&lt;/span&gt;&lt;br/&gt;Or I guess you could also iterate through all columns and find the one with the Header you are looking for, and then change its width.</description><pubDate>Wed, 22 Feb 2012 16:36:24 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item></channel></rss>