Detecting presence of scrollbars in a ListView
- From: Dilip <rdilipk@xxxxxxxxx>
- Date: Tue, 26 Aug 2008 13:39:29 -0700 (PDT)
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?
.
- Follow-Ups:
- Prev by Date: Re: form.focus() event
- Next by Date: Re: C# language wish list
- Previous by thread: Re: form.focus() event
- Next by thread: Re: Detecting presence of scrollbars in a ListView
- Index(es):