Resize Columns after Scrollbar appears
In a C# Programm of mine I'm using a ListView. The ListVieew owns columns. In an iniatialisation phase i'm setting the width of the columns. At a later point of time listview items can be added by the user. If the number of listview items grows enough a vertical scrollbars appears. Because the Scrollbar takes space from the ClientRect the total amount of width of all columns couldn't be displayed and a horizontal scrollbar appears too. Now I don't want to have a horizontal scrollbar. How can I resize the column width of a listview after the vertical scrollbars appeared?
Thanks in Advance
Akademon
Re: Resize Columns after Scrollbar appears
I am also looking for a solution for that kind of problems. It is possible to notice an event if a scrollbar will be displayed or what other possibilities do I have for registrating a scrollbar is appeared?
In my case I need this for use in a panel. Any suggestions?
Re: Resize Columns after Scrollbar appears
perhaps you should use thirdparty controls like this:
http://www.codeproject.com/cs/miscctrl/aa_listview.asp
this is GlacialListView 1.3 , that has a property, that autosizes the last column. newer versions of this control are avaiable, but they are not cheap.