Spread Windows Forms 6.0 Product Documentation
SetCalendarFormat Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace > DateTimeCellType Class : SetCalendarFormat Method


calFormat
Format of the header of the calendar

Glossary Item Box

Sets the format to be used for the pop-up calendar header.

Syntax

Visual Basic (Declaration) 
Public Sub SetCalendarFormat( _
   ByVal calFormat As String _
) 
Visual Basic (Usage)Copy Code
Dim instance As DateTimeCellType
Dim calFormat As String
 
instance.SetCalendarFormat(calFormat)
C# 
public void SetCalendarFormat( 
   string calFormat
)

Parameters

calFormat
Format of the header of the calendar

Example

This example sets the format for the date in the calendar header.
C#Copy Code
FarPoint.Win.Spread.CellType.DateTimeCellType dt = new FarPoint.Win.Spread.CellType.DateTimeCellType();
dt.SetCalendarText(new String[] {"Sun", "Mon", "Tues", "Wed", "Thurs", "Fri", "Sat"}, new String[] {"Jan", "Feb", "Mar", "Apr",
"May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec"}, new String[] {"S", "M", "T", "W", "Th", "F", "Sa"}, new String[]
{"J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, "Finished", "Later", "Now"); dt.SetCalendarFormat("MM/dd/yyyy");
fpSpread1.ActiveSheet.Cells[0, 0].CellType = dt;
Visual BasicCopy Code
Dim dt As New FarPoint.Win.Spread.CellType.DateTimeCellType
dt.SetCalendarText(New String() {"Sun", "Mon", "Tues", "Wed", "Thurs", "Fri", "Sat"}, New String() {"Jan", "Feb", "Mar", "Apr",
"May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec"}, New String() {"S", "M", "T", "W", "Th", "F", "Sa"}, New String()
{"J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, "Finished", "Later", "Now")
dt.SetCalendarFormat("MM/dd/yyyy")
FpSpread1.ActiveSheet.Cells(0, 0).CellType = dt

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.