Well there is a way and it is quite simple.
The columns are stored in the ListView.Columns collection, so you can remove
and add columns as you like.
Only those in the collection will be shown.
E.g.
System.Windows.Forms.ColumnHeader headerToShowHide = new
System.Windows.Forms.ColumnHeader();
private void ToggleColumn()
{
if (this.myListView.Columns.Contains(headerToShowHide ))
{
this.myListView.Columns.Remove(headerToShowHide);
headerToShowHide.Text = "Now I am hidden";
}
else
{
headerToShowHide.Text = "See me now?";
this.myListView.Columns.Insert(1, headerToShowHide);
}
}
Just remove it when you want to hide it.
Insert it at the desired position and you see it again.
Eric-Paul Jansen
Inforay International B.V. (
http://www.inforay.com)
The Netherlands
"Roy Osherove" <ro**@iserializable.com> wrote in message
news:1d******************************@40tude.net.. .
On Sun, 9 Nov 2003 13:55:36 -0800, <so****@ntlworld.com> wrote:
Sorry,
I am actually using a ListView control.
Alan
[2 quoted lines suppressed]
make the [1 quoted line suppressed]
there's a [14 quoted lines suppressed]
(width [12 quoted lines suppressed]
Hmm. IN that case I don't think there's a way
--
Roy Osherove
weblog: http://www.iserializable.com