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


Glossary Item Box

Gets whether the element has focus.

Syntax

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

Property Value

Boolean value: true if element has focus; false otherwise

Remarks

When the element has the focus, it can display a focus rectangle. Specify whether and how the focus rectangle appears in the element by setting the DrawFocusRectangle property.

Specify whether the element can receive the focus by setting the CanFocus property or the Enabled property.

Move the focus to the element by calling the Focus(Boolean) method.

This property is available at run time only.

Example

csharpCopy Code
bool vbool;
element.AlignHorz = FarPoint.Win.HorizontalAlignment.Left;
element.AlignVert = FarPoint.Win.VerticalAlignment.Top;
element.TextWrap = true;
element.Text = "Let's plan on meeting at 10.";
vbool = element.Focused;
textBox1.Text = Convert.ToString(vbool);
Visual BasicCopy Code
Dim vbool As Boolean
element.AlignHorz = FarPoint.Win.HorizontalAlignment.Left
element.AlignVert = FarPoint.Win.VerticalAlignment.Top
element.TextWrap = true
element.Text = "Let's plan on meeting at 10."
vbool = control.Focused
TextBox1.Text = vbool

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.