Spread Windows Forms 6.0 Product Documentation
CanFocus Field
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetStyleProperty Class : CanFocus Field


Glossary Item Box

Represents the can focus setting of the sheet style.

Syntax

Visual Basic (Declaration) 
Public Shared ReadOnly CanFocus As SheetStyleProperty
Visual Basic (Usage)Copy Code
Dim value As SheetStyleProperty
 
value = SheetStyleProperty.CanFocus
C# 
public static readonly SheetStyleProperty CanFocus

Example

This example sets if the sheet allows focus to any cells.
C#Copy Code
FarPoint.Win.Spread.StyleInfo si = new FarPoint.Win.Spread.StyleInfo(); 
si.CanFocus = false; 
si.NoteStyle = NoteStyle.StickyNote; 
si.TabStop = false; 
si.VisualStyles = FarPoint.Win.VisualStyles.On; 
fpSpread1.ActiveSheet.DefaultStyle = si; 
bool b = si.IsPropertySet(FarPoint.Win.Spread.SheetStyleProperty.CanFocus); 
if (b == true) { 
     MessageBox.Show("No focus allowed"); 
}
Visual BasicCopy Code
Dim si As New FarPoint.Win.Spread.StyleInfo
si.CanFocus = False
si.NoteStyle = NoteStyle.StickyNote
si.TabStop = False
si.VisualStyles = FarPoint.Win.VisualStyles.On
FpSpread1.ActiveSheet.DefaultStyle = si
Dim b As Boolean = si.IsPropertySet(FarPoint.Win.Spread.SheetStyleProperty.CanFocus)
If b = True Then
    MessageBox.Show("No focus allowed")
End If

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.