On Aug 27, 9:49*am, Dilip <rdil...@lycos.comwrote:
On Aug 27, 2:24*am, Duggi <DuggiSrinivasa...@gmail.comwrote:
On Aug 27, 1:39*am, Dilip <rdil...@lycos.comwrote:
I inherited an owner drawn control that subclasses the Windows Forms
ListView control to provide additional functionalities. *I wanted to
detect the presence of the Vertical scrollbar so that I can disable a
few buttons. *This code didn't work:
foreach (Control c in ownerDrawnListViewObject.Controls)
{
* * if (c is VScrollBar)
* * {
* * * * return c.Visible;
* * }
}
This didn't work because, to my surprise,
ownerDrawnListViewObject.Controls.Count returned 0!
Am I going about this the wrong way?
I think you should check for "listView.Scrollable" and work around it
to detect horizontal and veritical
-Cnu
Sorry.. I have a bad case of butter fingers. Let me try again:
I believe ListView.Scrollable only ensures that the scrollbars will
show up if the entries in the ListView exceed the displayable area.
If you have only one or 2 entries for which no
scrollbar would show up, ListView.Scrollable would still return true.
That is not what I am after.