Export (0) Print
Expand All

TextBoxBase.SetBoundsCore Method

Sets the specified bounds of the TextBoxBase control.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

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

Parameters

x

The new Left property value of the control.

y

The new Top property value of the control.

width

The new Width property value of the control.

height

Not used.

specified

A bitwise combination of the BoundsSpecified values.

The TextBoxBase control uses the PreferredHeight property to set the bounds if the AutoSize property is true and the Multiline property is false.

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 the Size value of BoundsSpecified. However, if the Size is adjusted in response to the Dock property being set, the specified parameter value is the None value of BoundsSpecified.

Notes to Inheritors When overriding SetBoundsCore in a derived class, be sure to call the base class's SetBoundsCore method to force the bounds of the control to change. Derived classes can add size restrictions to the SetBoundsCore method.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft