Sponsored Ad

Wednesday, November 25, 2009

C# Bugs List View

The Problem

A ListView control can not show that it is vertical scroll bar when necessary, even if the property is set to true ListView.Scrollable. The source of this problem is to alternate ListView.CheckBoxes property, and only occurs under a specific condition. The error lies in the fact that the change of the property to true ListView.CheckBoxes not recheck the minimum height required for a vertical scroll bar.To Reproduce:

* The ListView.CheckBoxes property must be false.

* When we Add enough additional ListViewItems ListView control so that height of the all fields without fits CheckBoxes in the ListView, but the height of all points with check boxes do not fit into the control.

* Set ListView.CheckBoxes property to true. This will not cause. NET to add a scrollbar if the height of the forces of change some items out of sight.

The ListView will not have a vertical scroll bar until you perform some action on it, like changing the size or manual shifting for the last item in the list (any of these actions will trigger. NET to add a scroll bar).

This error is in Microsoft. NET Framework v2.0.50727 using C #.

The Solution

Until this error is corrected, the best solution is to set ListView.CheckBoxes property to true before adding items to the ListView. Once items are added, then decide to enable / disable check boxes.

0 comments:

Post a Comment

Sponsored Ad

More Related Articles

Website Update

Followers