AnchorStyles

AnchorStyles serializable, flag

System. Windows .Forms (system. windows .forms.dll) enum

This is used by Control objects to suggest to layout managers how they should be treated. The default layout manager first looks at Control.Dock on each contained object to see if it should be locked to one edge or another (see DockStyle ). If it is not docked , it then examines the Control.Anchor property.

If a Control is anchored to a particular edge, it means that the side nearest to that edge will be maintained at a fixed distance from it. You can anchor to more than one edge, allowing you to create controls that move or resize as their container is resized.

You can replace the default layout management by overriding the OnLayout() method. You might do this in conjunction with a System.ComponentModel.IExtenderProvider that adds additional properties to the contained Control objects to help manage the new layout mechanism.

 public enum  AnchorStyles  {  None = 0x00000000  ,  Top = 0x00000001  ,  Bottom = 0x00000002  ,  Left = 0x00000004  ,  Right = 0x00000008  } 

Hierarchy

System.Object System.ValueType System.Enum(System.IComparabl, System.IFormattable , System.IConvertible) AnchorStyles

Returned By

Control.Anchor

Passed To

Control.Anchor



. Net Windows Forms in a Nutshell
.NET Windows Forms in a Nutshell
ISBN: 0596003382
EAN: 2147483647
Year: 2002
Pages: 794

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net