Spread Windows Forms 9.0 Product Documentation
CanFocus Field
Example 


Represents the can focus setting of the sheet style.
Syntax
'Declaration
 
Public Shared ReadOnly CanFocus As SheetStyleProperty
'Usage
 
Dim value As SheetStyleProperty
 
value = SheetStyleProperty.CanFocus
public static readonly SheetStyleProperty CanFocus
Example
This example sets if the sheet allows focus to any cells.
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"); 
}
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 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

SheetStyleProperty Class
SheetStyleProperty Members

 

 


Copyright © GrapeCity, inc. All rights reserved.