Gets or sets a value indicating whether the control should resize to avoid showing partial items.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
When this property is set to true, the control automatically resizes to ensure that an item is not partially displayed. If you want to maintain the original size of the ListBox based on the space requirements of your form, set this property to false.
By default, the ListBox and the CheckedListBox sizes are such that they show only whole items. If you want the ListBox or CheckedListBox to completely fill a docked area, set to false. This causes the control to completely fill the area, but the last item is not fully displayed.
If the ListBox does not contain any items, this property has no effect.
The integral height is based on the height of the ListBox, rather than the client area height. As a result, when the property is set true, items can still be partially shown if scroll bars are displayed.
If the DrawMode property is set to DrawMode.OwnerDrawVariable, this property has no effect.
The following code example demonstrates how to use the HorizontalScrollbar and HorizontalExtent properties to display a horizontal scroll bar that shows all item text in the ListBox control. The example also uses the property to ensure that items are not partially displayed due to the size of the ListBox control. This example requires that a ListBox control, named listBox1, has been added to a form.