System.Windows.Forms.ListBox.SetBoundsCore Method

Sets the specified bounds of the System.Windows.Forms.ListBox control.

Syntax

protected override void SetBoundsCore (int x, int y, int width, int height, BoundsSpecified specified)

Parameters

x
The new Control.Left property value of the control.
y
The new Control.Top property value of the control.
width
The new Control.Width property value of the control.
height
The new Control.Height property value of the control.
specified
A bitwise combination of the System.Windows.Forms.BoundsSpecified values.

Remarks

The height of the System.Windows.Forms.ListBox control increases and decreases by a multiple of the ListBox.ItemHeight property. If height is a number that is not a multiple of ListBox.ItemHeight, the height of the System.Windows.Forms.ListBox will change by the largest multiple that is less than height.

Typically, the parameters that correspond to the bounds not included in the specified parameter are passed in with their current values. For example, the height, width, or the x or y properties of the Control.Location property can be passed in with a reference to the current instance of the control. However, all values passed in are honored and applied to the control.

The specified parameter represents the elements of the controls Control.Bounds changed by your application. For example, if you change the Control.Size of the control, the specified parameter value is BoundsSpecified.Size. However, if the Control.Size is adjusted in response to the Control.Dock property being set, the specified parameter value is BoundsSpecified.None.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0