Spread Windows Forms 12.0 Product Documentation
DrawFocusRectangle Property (ElementWindowless)
Example 


FarPoint.Win Assembly > FarPoint.Win Namespace > ElementWindowless Class : DrawFocusRectangle Property
Gets or sets whether and how the focus rectangle is displayed in the element.
Syntax
'Declaration
 
Public Overridable Property DrawFocusRectangle As DrawFocusRectangle
'Usage
 
Dim instance As ElementWindowless
Dim value As DrawFocusRectangle
 
instance.DrawFocusRectangle = value
 
value = instance.DrawFocusRectangle
public virtual DrawFocusRectangle DrawFocusRectangle {get; set;}

Property Value

DrawFocusRectangle setting that determines how the focus rectangle is displayed.
Remarks

You can specify whether and how the focus rectangle is drawn for the element by setting this property. The following figure shows the focus rectangle drawn around the picture only.

Specify whether the element can receive the focus by setting the CanFocus property. If the CanFocus property is set to true, you can check whether the element has the focus, or move the focus to the element, by calling the Focus method or check whether the element has the focus using the Focused property.

Example
element.Picture = System.Drawing.Image.FromFile("d:\\mail16A.ico");
element.AlignText = FarPoint.Win.TextAlign.TextLeftPictRight;
element.PictureMargin = 25;
element.MarginBottom = 20;
element.DrawFocusRectangle = FarPoint.Win.DrawFocusRectangle.AroundText;
element.Picture = System.Drawing.Image.FromFile("d:\mail16A.ico")
element.AlignText = FarPoint.Win.TextAlign.TextLeftPictRight
element.PictureMargin = 25
element.MarginBottom = 20
element.DrawFocusRectangle = FarPoint.Win.DrawFocusRectangle.AroundText
See Also

Reference

ElementWindowless Class
ElementWindowless Members
DrawFocusRectangle Enumeration
Focus method
Focused Property
CanFocus Property