Spread Windows Forms 6.0 Product Documentation
CanFocus Property
See Also  Support Options
FarPoint.Win Assembly > FarPoint.Win Namespace > ElementStyle Class : CanFocus Property


Glossary Item Box

Gets or sets whether the object can receive focus.

Syntax

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

Property Value

Boolean value: true if element can receive focus; false otherwise

Remarks

Use this property to specify whether an element can receive the focus.

If you do not want the control to receive focus nor for the user to interact with it, set the Enabled property to false.

For some objects, when the control receives the focus, if it can, the object can display a focus rectangle. Specify whether and how the focus rectangle appears by setting the DrawFocusRectangle property.

Some objects display a cursor when they receive the focus. For those objects, specify the position of the cursor by setting the EditModeCursorPosition property.

Contrast this property with the Enabled property and the Selectable property. Use the Enabled property to specify whether the object looks grayed and users can interact with it. Use the Selectable property to specify whether users can interact with the object, such as pressing a button.

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.