ListView scroll bar

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to determine if the scrollbar is present and what the width of it (or the inner control area) is
I'm trying to calculate the column widths to fill the ListView area when viewing 'Detail'.
If the V-Scrollbar appears it covers up part of my last column, then the H-Scrollbar appears
I want to resize the columns and loose the H-Scrollbar

thx
Troy
 
Troy,

I don't have all the answers, but you can determine the width of a scrollbar with

System.Windows.Forms::SystemInformation.VerticalScrollBarWidth

(SystemInformation contains dozens of useful parameters - don't cache them though because the user might change the layout during
runtime). In Delphi there was TListView.VisibleRowCount which one could use to compare to the number of items - however I haven't
found an eqivalent in the .NET framework so far.

-markus
 
Back
Top