property Event.Caption as String
Indicates the caption to be displayed on the event's label.

TypeDescription
String A String expression that indicates the event's caption. The string expression in the Caption property does not support HTML tags. It is a plain text.
The Caption of the event/appointment is displayed only if the <%=%5%> tag is included in the any of the following label properties: ShortLabel, LongLabel, ExtraLabel or ToolTip. In case you need HTML tags to be displayed on the event's body, you should use the LongLabel and ExtraLabel properties of the Event object.

By default, the ShortLabel is displayed only when the event's client area is small. If enough space the LongLabel and ExtraLabel may be displayed separately. The ShortLabel can not display HTML tags, instead the ExtraLabel and LongLabel can. In conclusion, you can define arbitrary labels for any event, you can have an automated label to be displayed for each event with different results based on the KnowProperty values.  

There are two samples on how you can use the Caption property like

The following samples shows how to use the Caption property of the Event.

VBA (MS Access, Excell...)

With Schedule1
	.DefaultEventLongLabel = "<%=%256%><br><b><%=%5%>"
	.DefaultEventShortLabel = .DefaultEventLongLabel
	.Calendar.Selection = #6/20/2012#
	With .Events
		.Add(#6/20/2012 9:00:00 AM#,#6/20/2012 11:00:00 AM#).Caption = "caption 1"
		With .Add(#6/20/2012 11:00:00 AM#,#6/20/2012 1:00:00 PM#)
			.LongLabel = ""
			.ExtraLabel = "<%=%5%>"
			.Caption = "caption 2"
		End With
		With .Add(#6/20/2012 1:00:00 PM#,#6/20/2012 3:00:00 PM#)
			.LongLabel = "<%=%256%><br><b><%=%5%><br><fgcolor=808080>another text"
			.Caption = "caption 3"
		End With
	End With
End With

VB6

With Schedule1
	.DefaultEventLongLabel = "<%=%256%><br><b><%=%5%>"
	.DefaultEventShortLabel = .DefaultEventLongLabel
	.Calendar.Selection = #6/20/2012#
	With .Events
		.Add(#6/20/2012 9:00:00 AM#,#6/20/2012 11:00:00 AM#).Caption = "caption 1"
		With .Add(#6/20/2012 11:00:00 AM#,#6/20/2012 1:00:00 PM#)
			.LongLabel = ""
			.ExtraLabel = "<%=%5%>"
			.Caption = "caption 2"
		End With
		With .Add(#6/20/2012 1:00:00 PM#,#6/20/2012 3:00:00 PM#)
			.LongLabel = "<%=%256%><br><b><%=%5%><br><fgcolor=808080>another text"
			.Caption = "caption 3"
		End With
	End With
End With

VB.NET

With Exschedule1
	.DefaultEventLongLabel = "<%=%256%><br><b><%=%5%>"
	.DefaultEventShortLabel = .DefaultEventLongLabel
	.Calendar.Selection = #6/20/2012#
	With .Events
		.Add(#6/20/2012 9:00:00 AM#,#6/20/2012 11:00:00 AM#).Caption = "caption 1"
		With .Add(#6/20/2012 11:00:00 AM#,#6/20/2012 1:00:00 PM#)
			.LongLabel = ""
			.ExtraLabel = "<%=%5%>"
			.Caption = "caption 2"
		End With
		With .Add(#6/20/2012 1:00:00 PM#,#6/20/2012 3:00:00 PM#)
			.LongLabel = "<%=%256%><br><b><%=%5%><br><fgcolor=808080>another text"
			.Caption = "caption 3"
		End With
	End With
End With

VB.NET for /COM

With AxSchedule1
	.DefaultEventLongLabel = "<%=%256%><br><b><%=%5%>"
	.DefaultEventShortLabel = .DefaultEventLongLabel
	.Calendar.Selection = #6/20/2012#
	With .Events
		.Add(#6/20/2012 9:00:00 AM#,#6/20/2012 11:00:00 AM#).Caption = "caption 1"
		With .Add(#6/20/2012 11:00:00 AM#,#6/20/2012 1:00:00 PM#)
			.LongLabel = ""
			.ExtraLabel = "<%=%5%>"
			.Caption = "caption 2"
		End With
		With .Add(#6/20/2012 1:00:00 PM#,#6/20/2012 3:00:00 PM#)
			.LongLabel = "<%=%256%><br><b><%=%5%><br><fgcolor=808080>another text"
			.Caption = "caption 3"
		End With
	End With
End With

C++

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSCHEDULELib' for the library: 'ExSchedule 1.0 Control Library'

	#import <ExSchedule.dll>
	using namespace EXSCHEDULELib;
*/
EXSCHEDULELib::ISchedulePtr spSchedule1 = GetDlgItem(IDC_SCHEDULE1)->GetControlUnknown();
spSchedule1->PutDefaultEventLongLabel(L"<%=%256%><br><b><%=%5%>");
spSchedule1->PutDefaultEventShortLabel(spSchedule1->GetDefaultEventLongLabel());
spSchedule1->GetCalendar()->PutSelection("6/20/2012");
EXSCHEDULELib::IEventsPtr var_Events = spSchedule1->GetEvents();
	var_Events->Add("6/20/2012 9:00:00 AM","6/20/2012 11:00:00 AM")->PutCaption(L"caption 1");
	EXSCHEDULELib::IEventPtr var_Event = var_Events->Add("6/20/2012 11:00:00 AM","6/20/2012 1:00:00 PM");
		var_Event->PutLongLabel(L"");
		var_Event->PutExtraLabel(L"<%=%5%>");
		var_Event->PutCaption(L"caption 2");
	EXSCHEDULELib::IEventPtr var_Event1 = var_Events->Add("6/20/2012 1:00:00 PM","6/20/2012 3:00:00 PM");
		var_Event1->PutLongLabel(L"<%=%256%><br><b><%=%5%><br><fgcolor=808080>another text");
		var_Event1->PutCaption(L"caption 3");

C++ Builder

Schedule1->DefaultEventLongLabel = L"<%=%256%><br><b><%=%5%>";
Schedule1->DefaultEventShortLabel = Schedule1->DefaultEventLongLabel;
Schedule1->Calendar->set_Selection(TVariant(TDateTime(2012,6,20).operator double()));
Exschedulelib_tlb::IEventsPtr var_Events = Schedule1->Events;
	var_Events->Add(TVariant(TDateTime(2012,6,20,9,00,00,0).operator double()),TVariant(TDateTime(2012,6,20,11,00,00,0).operator double()))->Caption = L"caption 1";
	Exschedulelib_tlb::IEventPtr var_Event = var_Events->Add(TVariant(TDateTime(2012,6,20,11,00,00,0).operator double()),TVariant(TDateTime(2012,6,20,13,00,00,0).operator double()));
		var_Event->LongLabel = L"";
		var_Event->ExtraLabel = L"<%=%5%>";
		var_Event->Caption = L"caption 2";
	Exschedulelib_tlb::IEventPtr var_Event1 = var_Events->Add(TVariant(TDateTime(2012,6,20,13,00,00,0).operator double()),TVariant(TDateTime(2012,6,20,15,00,00,0).operator double()));
		var_Event1->LongLabel = L"<%=%256%><br><b><%=%5%><br><fgcolor=808080>another text";
		var_Event1->Caption = L"caption 3";

C#

exschedule1.DefaultEventLongLabel = "<%=%256%><br><b><%=%5%>";
exschedule1.DefaultEventShortLabel = exschedule1.DefaultEventLongLabel;
exschedule1.Calendar.Selection = Convert.ToDateTime("6/20/2012",System.Globalization.CultureInfo.GetCultureInfo("en-US"));
exontrol.EXSCHEDULELib.Events var_Events = exschedule1.Events;
	var_Events.Add(Convert.ToDateTime("6/20/2012 9:00:00 AM",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/20/2012 11:00:00 AM",System.Globalization.CultureInfo.GetCultureInfo("en-US"))).Caption = "caption 1";
	exontrol.EXSCHEDULELib.Event var_Event = var_Events.Add(Convert.ToDateTime("6/20/2012 11:00:00 AM",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/20/2012 1:00:00 PM",System.Globalization.CultureInfo.GetCultureInfo("en-US")));
		var_Event.LongLabel = "";
		var_Event.ExtraLabel = "<%=%5%>";
		var_Event.Caption = "caption 2";
	exontrol.EXSCHEDULELib.Event var_Event1 = var_Events.Add(Convert.ToDateTime("6/20/2012 1:00:00 PM",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/20/2012 3:00:00 PM",System.Globalization.CultureInfo.GetCultureInfo("en-US")));
		var_Event1.LongLabel = "<%=%256%><br><b><%=%5%><br><fgcolor=808080>another text";
		var_Event1.Caption = "caption 3";

JavaScript

<OBJECT classid="clsid:9B09E13D-7A88-4299-9DBE-383380435377" id="Schedule1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
	Schedule1.DefaultEventLongLabel = "<%=%256%><br><b><%=%5%>";
	Schedule1.DefaultEventShortLabel = Schedule1.DefaultEventLongLabel;
	Schedule1.Calendar.Selection = "6/20/2012";
	var var_Events = Schedule1.Events;
		var_Events.Add("6/20/2012 9:00:00 AM","6/20/2012 11:00:00 AM").Caption = "caption 1";
		var var_Event = var_Events.Add("6/20/2012 11:00:00 AM","6/20/2012 1:00:00 PM");
			var_Event.LongLabel = "";
			var_Event.ExtraLabel = "<%=%5%>";
			var_Event.Caption = "caption 2";
		var var_Event1 = var_Events.Add("6/20/2012 1:00:00 PM","6/20/2012 3:00:00 PM");
			var_Event1.LongLabel = "<%=%256%><br><b><%=%5%><br><fgcolor=808080>another text";
			var_Event1.Caption = "caption 3";
</SCRIPT>

C# for /COM

axSchedule1.DefaultEventLongLabel = "<%=%256%><br><b><%=%5%>";
axSchedule1.DefaultEventShortLabel = axSchedule1.DefaultEventLongLabel;
axSchedule1.Calendar.Selection = Convert.ToDateTime("6/20/2012",System.Globalization.CultureInfo.GetCultureInfo("en-US"));
EXSCHEDULELib.Events var_Events = axSchedule1.Events;
	var_Events.Add(Convert.ToDateTime("6/20/2012 9:00:00 AM",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/20/2012 11:00:00 AM",System.Globalization.CultureInfo.GetCultureInfo("en-US"))).Caption = "caption 1";
	EXSCHEDULELib.Event var_Event = var_Events.Add(Convert.ToDateTime("6/20/2012 11:00:00 AM",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/20/2012 1:00:00 PM",System.Globalization.CultureInfo.GetCultureInfo("en-US")));
		var_Event.LongLabel = "";
		var_Event.ExtraLabel = "<%=%5%>";
		var_Event.Caption = "caption 2";
	EXSCHEDULELib.Event var_Event1 = var_Events.Add(Convert.ToDateTime("6/20/2012 1:00:00 PM",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/20/2012 3:00:00 PM",System.Globalization.CultureInfo.GetCultureInfo("en-US")));
		var_Event1.LongLabel = "<%=%256%><br><b><%=%5%><br><fgcolor=808080>another text";
		var_Event1.Caption = "caption 3";

X++ (Dynamics Ax 2009)

public void init()
{
	COM com_Event,com_Event1,com_Events;
	anytype var_Event,var_Event1,var_Events;
	;

	super();

	exschedule1.DefaultEventLongLabel("<%=%256%><br><b><%=%5%>");
	exschedule1.DefaultEventShortLabel(exschedule1.DefaultEventLongLabel());
	exschedule1.Calendar().Selection(COMVariant::createFromDate(str2Date("6/20/2012",213)));
	var_Events = exschedule1.Events(); com_Events = var_Events;
		var_Event = COM::createFromObject(com_Events.Add(COMVariant::createFromUtcDateTime(str2Datetime("6/20/2012 9:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("6/20/2012 11:00:00",213)))); com_Event = var_Event;
		com_Event.Caption("caption 1");
		var_Event = com_Events.Add(COMVariant::createFromUtcDateTime(str2Datetime("6/20/2012 11:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("6/20/2012 13:00:00",213))); com_Event = var_Event;
			com_Event.LongLabel("");
			com_Event.ExtraLabel("<%=%5%>");
			com_Event.Caption("caption 2");
		var_Event1 = com_Events.Add(COMVariant::createFromUtcDateTime(str2Datetime("6/20/2012 13:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("6/20/2012 15:00:00",213))); com_Event1 = var_Event1;
			com_Event1.LongLabel("<%=%256%><br><b><%=%5%><br><fgcolor=808080>another text");
			com_Event1.Caption("caption 3");
}

Delphi 8 (.NET only)

with AxSchedule1 do
begin
	DefaultEventLongLabel := '<%=%256%><br><b><%=%5%>';
	DefaultEventShortLabel := DefaultEventLongLabel;
	Calendar.Selection := '6/20/2012';
	with Events do
	begin
		Add('6/20/2012 9:00:00 AM','6/20/2012 11:00:00 AM').Caption := 'caption 1';
		with Add('6/20/2012 11:00:00 AM','6/20/2012 1:00:00 PM') do
		begin
			LongLabel := '';
			ExtraLabel := '<%=%5%>';
			Caption := 'caption 2';
		end;
		with Add('6/20/2012 1:00:00 PM','6/20/2012 3:00:00 PM') do
		begin
			LongLabel := '<%=%256%><br><b><%=%5%><br><fgcolor=808080>another text';
			Caption := 'caption 3';
		end;
	end;
end

Delphi (standard)

with Schedule1 do
begin
	DefaultEventLongLabel := '<%=%256%><br><b><%=%5%>';
	DefaultEventShortLabel := DefaultEventLongLabel;
	Calendar.Selection := '6/20/2012';
	with Events do
	begin
		Add('6/20/2012 9:00:00 AM','6/20/2012 11:00:00 AM').Caption := 'caption 1';
		with Add('6/20/2012 11:00:00 AM','6/20/2012 1:00:00 PM') do
		begin
			LongLabel := '';
			ExtraLabel := '<%=%5%>';
			Caption := 'caption 2';
		end;
		with Add('6/20/2012 1:00:00 PM','6/20/2012 3:00:00 PM') do
		begin
			LongLabel := '<%=%256%><br><b><%=%5%><br><fgcolor=808080>another text';
			Caption := 'caption 3';
		end;
	end;
end

VFP

with thisform.Schedule1
	.DefaultEventLongLabel = "<%=%256%><br><b><%=%5%>"
	.DefaultEventShortLabel = .DefaultEventLongLabel
	.Calendar.Selection = {^2012-6-20}
	with .Events
		.Add({^2012-6-20 9:00:00},{^2012-6-20 11:00:00}).Caption = "caption 1"
		with .Add({^2012-6-20 11:00:00},{^2012-6-20 13:00:00})
			.LongLabel = ""
			.ExtraLabel = "<%=%5%>"
			.Caption = "caption 2"
		endwith
		with .Add({^2012-6-20 13:00:00},{^2012-6-20 15:00:00})
			.LongLabel = "<%=%256%><br><b><%=%5%><br><fgcolor=808080>another text"
			.Caption = "caption 3"
		endwith
	endwith
endwith

dBASE Plus

local oSchedule,var_Event,var_Event1,var_Event2,var_Events

oSchedule = form.Activex1.nativeObject
oSchedule.DefaultEventLongLabel = "<%=%256%><br><b><%=%5%>"
oSchedule.DefaultEventShortLabel = oSchedule.DefaultEventLongLabel
oSchedule.Calendar.Selection = "06/20/2012"
var_Events = oSchedule.Events
	// var_Events.Add("06/20/2012 09:00:00","06/20/2012 11:00:00").Caption = "caption 1"
	var_Event = var_Events.Add("06/20/2012 09:00:00","06/20/2012 11:00:00")
	with (oSchedule)
		TemplateDef = [Dim var_Event]
		TemplateDef = var_Event
		Template = [var_Event.Caption = "caption 1"]
	endwith
	var_Event1 = var_Events.Add("06/20/2012 11:00:00","06/20/2012 13:00:00")
		var_Event1.LongLabel = ""
		var_Event1.ExtraLabel = "<%=%5%>"
		var_Event1.Caption = "caption 2"
	var_Event2 = var_Events.Add("06/20/2012 13:00:00","06/20/2012 15:00:00")
		var_Event2.LongLabel = "<%=%256%><br><b><%=%5%><br><fgcolor=808080>another text"
		var_Event2.Caption = "caption 3"

XBasic (Alpha Five)

Dim oSchedule as P
Dim var_Event as P
Dim var_Event1 as P
Dim var_Event2 as P
Dim var_Events as P

oSchedule = topparent:CONTROL_ACTIVEX1.activex
oSchedule.DefaultEventLongLabel = "<%=%256%><br><b><%=%5%>"
oSchedule.DefaultEventShortLabel = oSchedule.DefaultEventLongLabel
oSchedule.Calendar.Selection = {06/20/2012}
var_Events = oSchedule.Events
	' var_Events.Add({06/20/2012 09:00:00},{06/20/2012 11:00:00}).Caption = "caption 1"
	var_Event = var_Events.Add({06/20/2012 09:00:00},{06/20/2012 11:00:00})
	oSchedule.TemplateDef = "Dim var_Event"
	oSchedule.TemplateDef = var_Event
	oSchedule.Template = "var_Event.Caption = \"caption 1\""

	var_Event1 = var_Events.Add({06/20/2012 11:00:00},{06/20/2012 13:00:00})
		var_Event1.LongLabel = ""
		var_Event1.ExtraLabel = "<%=%5%>"
		var_Event1.Caption = "caption 2"
	var_Event2 = var_Events.Add({06/20/2012 13:00:00},{06/20/2012 15:00:00})
		var_Event2.LongLabel = "<%=%256%><br><b><%=%5%><br><fgcolor=808080>another text"
		var_Event2.Caption = "caption 3"

Visual Objects

local var_Event,var_Event1 as IEvent
local var_Events as IEvents

oDCOCX_Exontrol1:DefaultEventLongLabel := "<%=%256%><br><b><%=%5%>"
oDCOCX_Exontrol1:DefaultEventShortLabel := oDCOCX_Exontrol1:DefaultEventLongLabel
oDCOCX_Exontrol1:Calendar:Selection := SToD("20120620")
var_Events := oDCOCX_Exontrol1:Events
	var_Events:Add(SToD("20120620 09:00:00"),SToD("20120620 11:00:00")):Caption := "caption 1"
	var_Event := var_Events:Add(SToD("20120620 11:00:00"),SToD("20120620 13:00:00"))
		var_Event:LongLabel := ""
		var_Event:ExtraLabel := "<%=%5%>"
		var_Event:Caption := "caption 2"
	var_Event1 := var_Events:Add(SToD("20120620 13:00:00"),SToD("20120620 15:00:00"))
		var_Event1:LongLabel := "<%=%256%><br><b><%=%5%><br><fgcolor=808080>another text"
		var_Event1:Caption := "caption 3"

PowerBuilder

OleObject oSchedule,var_Event,var_Event1,var_Events

oSchedule = ole_1.Object
oSchedule.DefaultEventLongLabel = "<%=%256%><br><b><%=%5%>"
oSchedule.DefaultEventShortLabel = oSchedule.DefaultEventLongLabel
oSchedule.Calendar.Selection = 2012-06-20
var_Events = oSchedule.Events
	var_Events.Add(DateTime(2012-06-20,09:00:00),DateTime(2012-06-20,11:00:00)).Caption = "caption 1"
	var_Event = var_Events.Add(DateTime(2012-06-20,11:00:00),DateTime(2012-06-20,13:00:00))
		var_Event.LongLabel = ""
		var_Event.ExtraLabel = "<%=%5%>"
		var_Event.Caption = "caption 2"
	var_Event1 = var_Events.Add(DateTime(2012-06-20,13:00:00),DateTime(2012-06-20,15:00:00))
		var_Event1.LongLabel = "<%=%256%><br><b><%=%5%><br><fgcolor=808080>another text"
		var_Event1.Caption = "caption 3"

 

The following sample uses and display just the Caption of the event.

VBA (MS Access, Excell...)

With Schedule1
	.DefaultEventLongLabel = "<%=%5%>"
	.DefaultEventShortLabel = .DefaultEventLongLabel
	.Calendar.Selection = #6/20/2012#
	With .Events
		.Add(#6/20/2012 9:00:00 AM#,#6/20/2012 11:00:00 AM#).Caption = "caption 1"
		.Add(#6/20/2012 11:00:00 AM#,#6/20/2012 1:00:00 PM#).Caption = "caption 2"
		.Add(#6/20/2012 1:00:00 PM#,#6/20/2012 3:00:00 PM#).Caption = "caption 3"
	End With
End With

VB6

With Schedule1
	.DefaultEventLongLabel = "<%=%5%>"
	.DefaultEventShortLabel = .DefaultEventLongLabel
	.Calendar.Selection = #6/20/2012#
	With .Events
		.Add(#6/20/2012 9:00:00 AM#,#6/20/2012 11:00:00 AM#).Caption = "caption 1"
		.Add(#6/20/2012 11:00:00 AM#,#6/20/2012 1:00:00 PM#).Caption = "caption 2"
		.Add(#6/20/2012 1:00:00 PM#,#6/20/2012 3:00:00 PM#).Caption = "caption 3"
	End With
End With

VB.NET

With Exschedule1
	.DefaultEventLongLabel = "<%=%5%>"
	.DefaultEventShortLabel = .DefaultEventLongLabel
	.Calendar.Selection = #6/20/2012#
	With .Events
		.Add(#6/20/2012 9:00:00 AM#,#6/20/2012 11:00:00 AM#).Caption = "caption 1"
		.Add(#6/20/2012 11:00:00 AM#,#6/20/2012 1:00:00 PM#).Caption = "caption 2"
		.Add(#6/20/2012 1:00:00 PM#,#6/20/2012 3:00:00 PM#).Caption = "caption 3"
	End With
End With

VB.NET for /COM

With AxSchedule1
	.DefaultEventLongLabel = "<%=%5%>"
	.DefaultEventShortLabel = .DefaultEventLongLabel
	.Calendar.Selection = #6/20/2012#
	With .Events
		.Add(#6/20/2012 9:00:00 AM#,#6/20/2012 11:00:00 AM#).Caption = "caption 1"
		.Add(#6/20/2012 11:00:00 AM#,#6/20/2012 1:00:00 PM#).Caption = "caption 2"
		.Add(#6/20/2012 1:00:00 PM#,#6/20/2012 3:00:00 PM#).Caption = "caption 3"
	End With
End With

C++

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSCHEDULELib' for the library: 'ExSchedule 1.0 Control Library'

	#import <ExSchedule.dll>
	using namespace EXSCHEDULELib;
*/
EXSCHEDULELib::ISchedulePtr spSchedule1 = GetDlgItem(IDC_SCHEDULE1)->GetControlUnknown();
spSchedule1->PutDefaultEventLongLabel(L"<%=%5%>");
spSchedule1->PutDefaultEventShortLabel(spSchedule1->GetDefaultEventLongLabel());
spSchedule1->GetCalendar()->PutSelection("6/20/2012");
EXSCHEDULELib::IEventsPtr var_Events = spSchedule1->GetEvents();
	var_Events->Add("6/20/2012 9:00:00 AM","6/20/2012 11:00:00 AM")->PutCaption(L"caption 1");
	var_Events->Add("6/20/2012 11:00:00 AM","6/20/2012 1:00:00 PM")->PutCaption(L"caption 2");
	var_Events->Add("6/20/2012 1:00:00 PM","6/20/2012 3:00:00 PM")->PutCaption(L"caption 3");

C++ Builder

Schedule1->DefaultEventLongLabel = L"<%=%5%>";
Schedule1->DefaultEventShortLabel = Schedule1->DefaultEventLongLabel;
Schedule1->Calendar->set_Selection(TVariant(TDateTime(2012,6,20).operator double()));
Exschedulelib_tlb::IEventsPtr var_Events = Schedule1->Events;
	var_Events->Add(TVariant(TDateTime(2012,6,20,9,00,00,0).operator double()),TVariant(TDateTime(2012,6,20,11,00,00,0).operator double()))->Caption = L"caption 1";
	var_Events->Add(TVariant(TDateTime(2012,6,20,11,00,00,0).operator double()),TVariant(TDateTime(2012,6,20,13,00,00,0).operator double()))->Caption = L"caption 2";
	var_Events->Add(TVariant(TDateTime(2012,6,20,13,00,00,0).operator double()),TVariant(TDateTime(2012,6,20,15,00,00,0).operator double()))->Caption = L"caption 3";

C#

exschedule1.DefaultEventLongLabel = "<%=%5%>";
exschedule1.DefaultEventShortLabel = exschedule1.DefaultEventLongLabel;
exschedule1.Calendar.Selection = Convert.ToDateTime("6/20/2012",System.Globalization.CultureInfo.GetCultureInfo("en-US"));
exontrol.EXSCHEDULELib.Events var_Events = exschedule1.Events;
	var_Events.Add(Convert.ToDateTime("6/20/2012 9:00:00 AM",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/20/2012 11:00:00 AM",System.Globalization.CultureInfo.GetCultureInfo("en-US"))).Caption = "caption 1";
	var_Events.Add(Convert.ToDateTime("6/20/2012 11:00:00 AM",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/20/2012 1:00:00 PM",System.Globalization.CultureInfo.GetCultureInfo("en-US"))).Caption = "caption 2";
	var_Events.Add(Convert.ToDateTime("6/20/2012 1:00:00 PM",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/20/2012 3:00:00 PM",System.Globalization.CultureInfo.GetCultureInfo("en-US"))).Caption = "caption 3";

JavaScript

<OBJECT classid="clsid:9B09E13D-7A88-4299-9DBE-383380435377" id="Schedule1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
	Schedule1.DefaultEventLongLabel = "<%=%5%>";
	Schedule1.DefaultEventShortLabel = Schedule1.DefaultEventLongLabel;
	Schedule1.Calendar.Selection = "6/20/2012";
	var var_Events = Schedule1.Events;
		var_Events.Add("6/20/2012 9:00:00 AM","6/20/2012 11:00:00 AM").Caption = "caption 1";
		var_Events.Add("6/20/2012 11:00:00 AM","6/20/2012 1:00:00 PM").Caption = "caption 2";
		var_Events.Add("6/20/2012 1:00:00 PM","6/20/2012 3:00:00 PM").Caption = "caption 3";
</SCRIPT>

C# for /COM

axSchedule1.DefaultEventLongLabel = "<%=%5%>";
axSchedule1.DefaultEventShortLabel = axSchedule1.DefaultEventLongLabel;
axSchedule1.Calendar.Selection = Convert.ToDateTime("6/20/2012",System.Globalization.CultureInfo.GetCultureInfo("en-US"));
EXSCHEDULELib.Events var_Events = axSchedule1.Events;
	var_Events.Add(Convert.ToDateTime("6/20/2012 9:00:00 AM",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/20/2012 11:00:00 AM",System.Globalization.CultureInfo.GetCultureInfo("en-US"))).Caption = "caption 1";
	var_Events.Add(Convert.ToDateTime("6/20/2012 11:00:00 AM",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/20/2012 1:00:00 PM",System.Globalization.CultureInfo.GetCultureInfo("en-US"))).Caption = "caption 2";
	var_Events.Add(Convert.ToDateTime("6/20/2012 1:00:00 PM",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/20/2012 3:00:00 PM",System.Globalization.CultureInfo.GetCultureInfo("en-US"))).Caption = "caption 3";

X++ (Dynamics Ax 2009)

public void init()
{
	COM com_Event,com_Events;
	anytype var_Event,var_Events;
	;

	super();

	exschedule1.DefaultEventLongLabel("<%=%5%>");
	exschedule1.DefaultEventShortLabel(exschedule1.DefaultEventLongLabel());
	exschedule1.Calendar().Selection(COMVariant::createFromDate(str2Date("6/20/2012",213)));
	var_Events = exschedule1.Events(); com_Events = var_Events;
		var_Event = COM::createFromObject(com_Events.Add(COMVariant::createFromUtcDateTime(str2Datetime("6/20/2012 9:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("6/20/2012 11:00:00",213)))); com_Event = var_Event;
		com_Event.Caption("caption 1");
		var_Event = COM::createFromObject(com_Events.Add(COMVariant::createFromUtcDateTime(str2Datetime("6/20/2012 11:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("6/20/2012 13:00:00",213)))); com_Event = var_Event;
		com_Event.Caption("caption 2");
		var_Event = COM::createFromObject(com_Events.Add(COMVariant::createFromUtcDateTime(str2Datetime("6/20/2012 13:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("6/20/2012 15:00:00",213)))); com_Event = var_Event;
		com_Event.Caption("caption 3");
}

Delphi 8 (.NET only)

with AxSchedule1 do
begin
	DefaultEventLongLabel := '<%=%5%>';
	DefaultEventShortLabel := DefaultEventLongLabel;
	Calendar.Selection := '6/20/2012';
	with Events do
	begin
		Add('6/20/2012 9:00:00 AM','6/20/2012 11:00:00 AM').Caption := 'caption 1';
		Add('6/20/2012 11:00:00 AM','6/20/2012 1:00:00 PM').Caption := 'caption 2';
		Add('6/20/2012 1:00:00 PM','6/20/2012 3:00:00 PM').Caption := 'caption 3';
	end;
end

Delphi (standard)

with Schedule1 do
begin
	DefaultEventLongLabel := '<%=%5%>';
	DefaultEventShortLabel := DefaultEventLongLabel;
	Calendar.Selection := '6/20/2012';
	with Events do
	begin
		Add('6/20/2012 9:00:00 AM','6/20/2012 11:00:00 AM').Caption := 'caption 1';
		Add('6/20/2012 11:00:00 AM','6/20/2012 1:00:00 PM').Caption := 'caption 2';
		Add('6/20/2012 1:00:00 PM','6/20/2012 3:00:00 PM').Caption := 'caption 3';
	end;
end

VFP

with thisform.Schedule1
	.DefaultEventLongLabel = "<%=%5%>"
	.DefaultEventShortLabel = .DefaultEventLongLabel
	.Calendar.Selection = {^2012-6-20}
	with .Events
		.Add({^2012-6-20 9:00:00},{^2012-6-20 11:00:00}).Caption = "caption 1"
		.Add({^2012-6-20 11:00:00},{^2012-6-20 13:00:00}).Caption = "caption 2"
		.Add({^2012-6-20 13:00:00},{^2012-6-20 15:00:00}).Caption = "caption 3"
	endwith
endwith

dBASE Plus

local oSchedule,var_Event,var_Event1,var_Event2,var_Events

oSchedule = form.Activex1.nativeObject
oSchedule.DefaultEventLongLabel = "<%=%5%>"
oSchedule.DefaultEventShortLabel = oSchedule.DefaultEventLongLabel
oSchedule.Calendar.Selection = "06/20/2012"
var_Events = oSchedule.Events
	// var_Events.Add("06/20/2012 09:00:00","06/20/2012 11:00:00").Caption = "caption 1"
	var_Event = var_Events.Add("06/20/2012 09:00:00","06/20/2012 11:00:00")
	with (oSchedule)
		TemplateDef = [Dim var_Event]
		TemplateDef = var_Event
		Template = [var_Event.Caption = "caption 1"]
	endwith
	// var_Events.Add("06/20/2012 11:00:00","06/20/2012 13:00:00").Caption = "caption 2"
	var_Event1 = var_Events.Add("06/20/2012 11:00:00","06/20/2012 13:00:00")
	with (oSchedule)
		TemplateDef = [Dim var_Event1]
		TemplateDef = var_Event1
		Template = [var_Event1.Caption = "caption 2"]
	endwith
	// var_Events.Add("06/20/2012 13:00:00","06/20/2012 15:00:00").Caption = "caption 3"
	var_Event2 = var_Events.Add("06/20/2012 13:00:00","06/20/2012 15:00:00")
	with (oSchedule)
		TemplateDef = [Dim var_Event2]
		TemplateDef = var_Event2
		Template = [var_Event2.Caption = "caption 3"]
	endwith

XBasic (Alpha Five)

Dim oSchedule as P
Dim var_Event as P
Dim var_Event1 as P
Dim var_Event2 as P
Dim var_Events as P

oSchedule = topparent:CONTROL_ACTIVEX1.activex
oSchedule.DefaultEventLongLabel = "<%=%5%>"
oSchedule.DefaultEventShortLabel = oSchedule.DefaultEventLongLabel
oSchedule.Calendar.Selection = {06/20/2012}
var_Events = oSchedule.Events
	' var_Events.Add({06/20/2012 09:00:00},{06/20/2012 11:00:00}).Caption = "caption 1"
	var_Event = var_Events.Add({06/20/2012 09:00:00},{06/20/2012 11:00:00})
	oSchedule.TemplateDef = "Dim var_Event"
	oSchedule.TemplateDef = var_Event
	oSchedule.Template = "var_Event.Caption = \"caption 1\""

	' var_Events.Add({06/20/2012 11:00:00},{06/20/2012 13:00:00}).Caption = "caption 2"
	var_Event1 = var_Events.Add({06/20/2012 11:00:00},{06/20/2012 13:00:00})
	oSchedule.TemplateDef = "Dim var_Event1"
	oSchedule.TemplateDef = var_Event1
	oSchedule.Template = "var_Event1.Caption = \"caption 2\""

	' var_Events.Add({06/20/2012 13:00:00},{06/20/2012 15:00:00}).Caption = "caption 3"
	var_Event2 = var_Events.Add({06/20/2012 13:00:00},{06/20/2012 15:00:00})
	oSchedule.TemplateDef = "Dim var_Event2"
	oSchedule.TemplateDef = var_Event2
	oSchedule.Template = "var_Event2.Caption = \"caption 3\""


Visual Objects

local var_Events as IEvents

oDCOCX_Exontrol1:DefaultEventLongLabel := "<%=%5%>"
oDCOCX_Exontrol1:DefaultEventShortLabel := oDCOCX_Exontrol1:DefaultEventLongLabel
oDCOCX_Exontrol1:Calendar:Selection := SToD("20120620")
var_Events := oDCOCX_Exontrol1:Events
	var_Events:Add(SToD("20120620 09:00:00"),SToD("20120620 11:00:00")):Caption := "caption 1"
	var_Events:Add(SToD("20120620 11:00:00"),SToD("20120620 13:00:00")):Caption := "caption 2"
	var_Events:Add(SToD("20120620 13:00:00"),SToD("20120620 15:00:00")):Caption := "caption 3"

PowerBuilder

OleObject oSchedule,var_Events

oSchedule = ole_1.Object
oSchedule.DefaultEventLongLabel = "<%=%5%>"
oSchedule.DefaultEventShortLabel = oSchedule.DefaultEventLongLabel
oSchedule.Calendar.Selection = 2012-06-20
var_Events = oSchedule.Events
	var_Events.Add(DateTime(2012-06-20,09:00:00),DateTime(2012-06-20,11:00:00)).Caption = "caption 1"
	var_Events.Add(DateTime(2012-06-20,11:00:00),DateTime(2012-06-20,13:00:00)).Caption = "caption 2"
	var_Events.Add(DateTime(2012-06-20,13:00:00),DateTime(2012-06-20,15:00:00)).Caption = "caption 3"