Spread Windows Forms 6.0 Product Documentation
ControlType Property
See Also  Example Support Options
FarPoint.Win Assembly > FarPoint.Win Namespace > SuperEditBase Class : ControlType Property


Glossary Item Box

Gets or sets whether the control is read-write, read-only, static, or allows values to be changed by pressing buttons.

Syntax

Visual Basic (Declaration) 
Public Overridable Property ControlType As ControlType
Visual Basic (Usage)Copy Code
Dim instance As SuperEditBase
Dim value As ControlType
 
instance.ControlType = value
 
value = instance.ControlType
C# 
public virtual ControlType ControlType {get; set;}

Property Value

ControlType setting that determines how contents are handled

Remarks

Use this property to determine how the contents of the edit control are handled. 

Note: The same events occur for read-only controls as for normal controls. For static controls, only the following events occur: Click, DoubleClick, DragDrop, DragOver, MouseDown, MouseMove, and MouseUp.

When the this property is set to ControlType.Static, the TabStop property is automatically set to false.

Setting ControlType.ButtonEdit has an effect only when the ButtonStyle property is set to a value other than ButtonStyle.None.

Example

C#Copy Code
control.EditModeCursorPosition = FarPoint.Win.EditModeCursorPosition.LastKnownPosition;
control.Text = "This is a test for HideSelection";
control.ControlType = FarPoint.Win.ControlType.Normal;
control.SelectionStart = 2;
control.SelectionLength = 5;
control.Selectable = true;
control.HideSelection = false;
control.AutoMenu = true;
textBox1.Text = control.SelectedText();
control.MaxLength = 9;
Visual BasicCopy Code
control.EditModeCursorPosition = FarPoint.Win.EditModeCursorPosition.LastKnownPosition
control.Text = "This is a test for HideSelection"
control.ControlType = FarPoint.Win.ControlType.Normal
control.SelectionStart = 2
control.SelectionLength = 5
control.Selectable = True
control.HideSelection = False
control.AutoMenu = True
TextBox1.Text = control.SelectedText()
control.MaxLength = 9

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.