ListBox.SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the specified bounds of the ListBox control.
protected:
override void SetBoundsCore(int x, int y, int width, int height, System::Windows::Forms::BoundsSpecified specified);
protected override void SetBoundsCore (int x, int y, int width, int height, System.Windows.Forms.BoundsSpecified specified);
override this.SetBoundsCore : int * int * int * int * System.Windows.Forms.BoundsSpecified -> unit
Protected Overrides Sub SetBoundsCore (x As Integer, y As Integer, width As Integer, height As Integer, specified As BoundsSpecified)
Parameters
- specified
- BoundsSpecified
A bitwise combination of the BoundsSpecified values.
Remarks
The height of the ListBox control increases and decreases by a multiple of the ItemHeight property. If height is a number that is not a multiple of ItemHeight, the height of the 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 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 Bounds changed by your application. For example, if you change the Size of the control, the specified
parameter value is Size. However, if the Size is adjusted in response to the Dock property being set, the specified
parameter value is None.
Notes to Inheritors
When overriding SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified) in a derived class, be sure to call the base class's SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified) method to force the bounds of the control to change. Derived classes can add size restrictions to the SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified) method.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應