Type | Description | |||
EditableCaptionEnum | An EditableCaptionEnum expression that specifies the property of the event being edited when event performs an inline editing. |
You can use the EventFromPoint(-1,-1) metod during the LayoutStartChanging( exScheduleEditEvent) to store the event from the cursor to a global member, and when LayoutEndChanging( exScheduleEditEvent) occurs, you can use the previously stored member to identify the event being edited like in the following snippet of code:
Private evEdit As Object
Private Sub Schedule1_LayoutStartChanging(ByVal Operation As EXSCHEDULELibCtl.LayoutChangingEnum) If (Operation = exScheduleEditEvent) Then Set evEdit = Schedule1.EventFromPoint(-1, -1) End If End Sub Private Sub Schedule1_LayoutEndChanging(ByVal Operation As EXSCHEDULELibCtl.LayoutChangingEnum) If (Operation = exScheduleEditEvent) Then If Not evEdit Is Nothing Then Debug.Print "Event: " & evEdit.Handle & " has been edited, and the new caption is: " & evEdit.ExtraLabel End If End If End Sub
The following sample edit and displays the event's LongLabel property only. During the AddEvent event you should call the Ev.Editable on 3, in case you need to be applied for any new event created.
VBA (MS Access, Excell...)
' AddEvent event - Notifies your application once the a new event is added. Private Sub Schedule1_AddEvent(ByVal Ev As Object) End Sub With Schedule1 .SelectEventStyle = 48 .DefaultEventLongLabel = "" .DefaultEventShortLabel = "" .CreateEventLabel = "" .Calendar.Selection = #1/10/2001# .OnResizeControl = 3073 With .Events With .Add(#1/10/2001 9:00:00 AM#,#1/10/2001 0:30:00 PM#) .Editable = 3 .LongLabel = "just your label" End With With .Add(#1/10/2001 10:00:00 AM#,#1/10/2001 1:00:00 PM#) .Editable = 3 .LongLabel = "just another label" End With End With End With
VB6
' AddEvent event - Notifies your application once the a new event is added. Private Sub Schedule1_AddEvent(ByVal Ev As EXSCHEDULELibCtl.IEvent) End Sub With Schedule1 .SelectEventStyle = exLinesSolid .DefaultEventLongLabel = "" .DefaultEventShortLabel = "" .CreateEventLabel = "" .Calendar.Selection = #1/10/2001# .OnResizeControl = OnResizeControlEnum.exResizePanelRight Or OnResizeControlEnum.exCalendarFit Or OnResizeControlEnum.exCalendarAutoHide With .Events With .Add(#1/10/2001 9:00:00 AM#,#1/10/2001 0:30:00 PM#) .Editable = exEditLongLabel .LongLabel = "just your label" End With With .Add(#1/10/2001 10:00:00 AM#,#1/10/2001 1:00:00 PM#) .Editable = exEditLongLabel .LongLabel = "just another label" End With End With End With
VB.NET
' AddEvent event - Notifies your application once the a new event is added. Private Sub Exschedule1_AddEvent(ByVal sender As System.Object,ByVal Ev As exontrol.EXSCHEDULELib.Event) Handles Exschedule1.AddEvent End Sub With Exschedule1 .SelectEventStyle = exontrol.EXSCHEDULELib.LinesStyleEnum.exLinesSolid .DefaultEventLongLabel = "" .DefaultEventShortLabel = "" .CreateEventLabel = "" .Calendar.Selection = #1/10/2001# .OnResizeControl = exontrol.EXSCHEDULELib.OnResizeControlEnum.exResizePanelRight Or exontrol.EXSCHEDULELib.OnResizeControlEnum.exCalendarFit Or exontrol.EXSCHEDULELib.OnResizeControlEnum.exCalendarAutoHide With .Events With .Add(#1/10/2001 9:00:00 AM#,#1/10/2001 0:30:00 PM#) .Editable = exontrol.EXSCHEDULELib.EditableCaptionEnum.exEditLongLabel .LongLabel = "just your label" End With With .Add(#1/10/2001 10:00:00 AM#,#1/10/2001 1:00:00 PM#) .Editable = exontrol.EXSCHEDULELib.EditableCaptionEnum.exEditLongLabel .LongLabel = "just another label" End With End With End With
VB.NET for /COM
' AddEvent event - Notifies your application once the a new event is added. Private Sub AxSchedule1_AddEvent(ByVal sender As System.Object, ByVal e As AxEXSCHEDULELib._IScheduleEvents_AddEventEvent) Handles AxSchedule1.AddEvent End Sub With AxSchedule1 .SelectEventStyle = EXSCHEDULELib.LinesStyleEnum.exLinesSolid .DefaultEventLongLabel = "" .DefaultEventShortLabel = "" .CreateEventLabel = "" .Calendar.Selection = #1/10/2001# .OnResizeControl = EXSCHEDULELib.OnResizeControlEnum.exResizePanelRight Or EXSCHEDULELib.OnResizeControlEnum.exCalendarFit Or EXSCHEDULELib.OnResizeControlEnum.exCalendarAutoHide With .Events With .Add(#1/10/2001 9:00:00 AM#,#1/10/2001 0:30:00 PM#) .Editable = EXSCHEDULELib.EditableCaptionEnum.exEditLongLabel .LongLabel = "just your label" End With With .Add(#1/10/2001 10:00:00 AM#,#1/10/2001 1:00:00 PM#) .Editable = EXSCHEDULELib.EditableCaptionEnum.exEditLongLabel .LongLabel = "just another label" End With End With End With
C++
// AddEvent event - Notifies your application once the a new event is added. void OnAddEventSchedule1(LPDISPATCH Ev) { } /* 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->PutSelectEventStyle(EXSCHEDULELib::exLinesSolid); spSchedule1->PutDefaultEventLongLabel(L""); spSchedule1->PutDefaultEventShortLabel(L""); spSchedule1->PutCreateEventLabel(L""); spSchedule1->GetCalendar()->PutSelection("1/10/2001"); spSchedule1->PutOnResizeControl(EXSCHEDULELib::OnResizeControlEnum(EXSCHEDULELib::exResizePanelRight | EXSCHEDULELib::exCalendarFit | EXSCHEDULELib::exCalendarAutoHide)); EXSCHEDULELib::IEventsPtr var_Events = spSchedule1->GetEvents(); EXSCHEDULELib::IEventPtr var_Event = var_Events->Add("1/10/2001 9:00:00 AM","1/10/2001 12:30:00 PM"); var_Event->PutEditable(EXSCHEDULELib::exEditLongLabel); var_Event->PutLongLabel(L"just your label"); EXSCHEDULELib::IEventPtr var_Event1 = var_Events->Add("1/10/2001 10:00:00 AM","1/10/2001 1:00:00 PM"); var_Event1->PutEditable(EXSCHEDULELib::exEditLongLabel); var_Event1->PutLongLabel(L"just another label");
C++ Builder
// AddEvent event - Notifies your application once the a new event is added. void __fastcall TForm1::Schedule1AddEvent(TObject *Sender,Exschedulelib_tlb::IEvent *Ev) { } Schedule1->SelectEventStyle = Exschedulelib_tlb::LinesStyleEnum::exLinesSolid; Schedule1->DefaultEventLongLabel = L""; Schedule1->DefaultEventShortLabel = L""; Schedule1->CreateEventLabel = L""; Schedule1->Calendar->set_Selection(TVariant(TDateTime(2001,1,10).operator double())); Schedule1->OnResizeControl = Exschedulelib_tlb::OnResizeControlEnum::exResizePanelRight | Exschedulelib_tlb::OnResizeControlEnum::exCalendarFit | Exschedulelib_tlb::OnResizeControlEnum::exCalendarAutoHide; Exschedulelib_tlb::IEventsPtr var_Events = Schedule1->Events; Exschedulelib_tlb::IEventPtr var_Event = var_Events->Add(TVariant(TDateTime(2001,1,10,9,00,00,0).operator double()),TVariant(TDateTime(2001,1,10,12,30,00,0).operator double())); var_Event->Editable = Exschedulelib_tlb::EditableCaptionEnum::exEditLongLabel; var_Event->LongLabel = L"just your label"; Exschedulelib_tlb::IEventPtr var_Event1 = var_Events->Add(TVariant(TDateTime(2001,1,10,10,00,00,0).operator double()),TVariant(TDateTime(2001,1,10,13,00,00,0).operator double())); var_Event1->Editable = Exschedulelib_tlb::EditableCaptionEnum::exEditLongLabel; var_Event1->LongLabel = L"just another label";
C#
// AddEvent event - Notifies your application once the a new event is added. private void exschedule1_AddEvent(object sender,exontrol.EXSCHEDULELib.Event Ev) { } //this.exschedule1.AddEvent += new exontrol.EXSCHEDULELib.exg2antt.AddEventEventHandler(this.exschedule1_AddEvent); exschedule1.SelectEventStyle = exontrol.EXSCHEDULELib.LinesStyleEnum.exLinesSolid; exschedule1.DefaultEventLongLabel = ""; exschedule1.DefaultEventShortLabel = ""; exschedule1.CreateEventLabel = ""; exschedule1.Calendar.Selection = Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exschedule1.OnResizeControl = exontrol.EXSCHEDULELib.OnResizeControlEnum.exResizePanelRight | exontrol.EXSCHEDULELib.OnResizeControlEnum.exCalendarFit | exontrol.EXSCHEDULELib.OnResizeControlEnum.exCalendarAutoHide; exontrol.EXSCHEDULELib.Events var_Events = exschedule1.Events; exontrol.EXSCHEDULELib.Event var_Event = var_Events.Add(Convert.ToDateTime("1/10/2001 9:00:00 AM",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001 12:30:00 PM",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Event.Editable = exontrol.EXSCHEDULELib.EditableCaptionEnum.exEditLongLabel; var_Event.LongLabel = "just your label"; exontrol.EXSCHEDULELib.Event var_Event1 = var_Events.Add(Convert.ToDateTime("1/10/2001 10:00:00 AM",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001 1:00:00 PM",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Event1.Editable = exontrol.EXSCHEDULELib.EditableCaptionEnum.exEditLongLabel; var_Event1.LongLabel = "just another label";
JavaScript
<SCRIPT FOR="Schedule1" EVENT="AddEvent(Ev)" LANGUAGE="JScript"> </SCRIPT> <OBJECT classid="clsid:9B09E13D-7A88-4299-9DBE-383380435377" id="Schedule1"></OBJECT> <SCRIPT LANGUAGE="JScript"> Schedule1.SelectEventStyle = 48; Schedule1.DefaultEventLongLabel = ""; Schedule1.DefaultEventShortLabel = ""; Schedule1.CreateEventLabel = ""; Schedule1.Calendar.Selection = "1/10/2001"; Schedule1.OnResizeControl = 3073; var var_Events = Schedule1.Events; var var_Event = var_Events.Add("1/10/2001 9:00:00 AM","1/10/2001 12:30:00 PM"); var_Event.Editable = 3; var_Event.LongLabel = "just your label"; var var_Event1 = var_Events.Add("1/10/2001 10:00:00 AM","1/10/2001 1:00:00 PM"); var_Event1.Editable = 3; var_Event1.LongLabel = "just another label"; </SCRIPT>
C# for /COM
// AddEvent event - Notifies your application once the a new event is added. private void axSchedule1_AddEvent(object sender, AxEXSCHEDULELib._IScheduleEvents_AddEventEvent e) { } //this.axSchedule1.AddEvent += new AxEXSCHEDULELib._IScheduleEvents_AddEventEventHandler(this.axSchedule1_AddEvent); axSchedule1.SelectEventStyle = EXSCHEDULELib.LinesStyleEnum.exLinesSolid; axSchedule1.DefaultEventLongLabel = ""; axSchedule1.DefaultEventShortLabel = ""; axSchedule1.CreateEventLabel = ""; axSchedule1.Calendar.Selection = Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); axSchedule1.OnResizeControl = EXSCHEDULELib.OnResizeControlEnum.exResizePanelRight | EXSCHEDULELib.OnResizeControlEnum.exCalendarFit | EXSCHEDULELib.OnResizeControlEnum.exCalendarAutoHide; EXSCHEDULELib.Events var_Events = axSchedule1.Events; EXSCHEDULELib.Event var_Event = var_Events.Add(Convert.ToDateTime("1/10/2001 9:00:00 AM",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001 12:30:00 PM",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Event.Editable = EXSCHEDULELib.EditableCaptionEnum.exEditLongLabel; var_Event.LongLabel = "just your label"; EXSCHEDULELib.Event var_Event1 = var_Events.Add(Convert.ToDateTime("1/10/2001 10:00:00 AM",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001 1:00:00 PM",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Event1.Editable = EXSCHEDULELib.EditableCaptionEnum.exEditLongLabel; var_Event1.LongLabel = "just another label";
X++ (Dynamics Ax 2009)
// AddEvent event - Notifies your application once the a new event is added. void onEvent_AddEvent(COM _Ev) { ; } public void init() { COM com_Event,com_Event1,com_Events; anytype var_Event,var_Event1,var_Events; ; super(); exschedule1.SelectEventStyle(48/*exLinesSolid*/); exschedule1.DefaultEventLongLabel(""); exschedule1.DefaultEventShortLabel(""); exschedule1.CreateEventLabel(""); exschedule1.Calendar().Selection(COMVariant::createFromDate(str2Date("1/10/2001",213))); exschedule1.OnResizeControl(3073/*exResizePanelRight | exCalendarFit | exCalendarAutoHide*/); var_Events = exschedule1.Events(); com_Events = var_Events; var_Event = com_Events.Add(COMVariant::createFromUtcDateTime(str2Datetime("1/10/2001 9:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("1/10/2001 12:30:00",213))); com_Event = var_Event; com_Event.Editable(3/*exEditLongLabel*/); com_Event.LongLabel("just your label"); var_Event1 = com_Events.Add(COMVariant::createFromUtcDateTime(str2Datetime("1/10/2001 10:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("1/10/2001 13:00:00",213))); com_Event1 = var_Event1; com_Event1.Editable(3/*exEditLongLabel*/); com_Event1.LongLabel("just another label"); }
Delphi 8 (.NET only)
// AddEvent event - Notifies your application once the a new event is added. procedure TWinForm1.AxSchedule1_AddEvent(sender: System.Object; e: AxEXSCHEDULELib._IScheduleEvents_AddEventEvent); begin end; with AxSchedule1 do begin SelectEventStyle := EXSCHEDULELib.LinesStyleEnum.exLinesSolid; DefaultEventLongLabel := ''; DefaultEventShortLabel := ''; CreateEventLabel := ''; Calendar.Selection := '1/10/2001'; OnResizeControl := Integer(EXSCHEDULELib.OnResizeControlEnum.exResizePanelRight) Or Integer(EXSCHEDULELib.OnResizeControlEnum.exCalendarFit) Or Integer(EXSCHEDULELib.OnResizeControlEnum.exCalendarAutoHide); with Events do begin with Add('1/10/2001 9:00:00 AM','1/10/2001 12:30:00 PM') do begin Editable := EXSCHEDULELib.EditableCaptionEnum.exEditLongLabel; LongLabel := 'just your label'; end; with Add('1/10/2001 10:00:00 AM','1/10/2001 1:00:00 PM') do begin Editable := EXSCHEDULELib.EditableCaptionEnum.exEditLongLabel; LongLabel := 'just another label'; end; end; end
Delphi (standard)
// AddEvent event - Notifies your application once the a new event is added. procedure TForm1.Schedule1AddEvent(ASender: TObject; Ev : IEvent); begin end; with Schedule1 do begin SelectEventStyle := EXSCHEDULELib_TLB.exLinesSolid; DefaultEventLongLabel := ''; DefaultEventShortLabel := ''; CreateEventLabel := ''; Calendar.Selection := '1/10/2001'; OnResizeControl := Integer(EXSCHEDULELib_TLB.exResizePanelRight) Or Integer(EXSCHEDULELib_TLB.exCalendarFit) Or Integer(EXSCHEDULELib_TLB.exCalendarAutoHide); with Events do begin with Add('1/10/2001 9:00:00 AM','1/10/2001 12:30:00 PM') do begin Editable := EXSCHEDULELib_TLB.exEditLongLabel; LongLabel := 'just your label'; end; with Add('1/10/2001 10:00:00 AM','1/10/2001 1:00:00 PM') do begin Editable := EXSCHEDULELib_TLB.exEditLongLabel; LongLabel := 'just another label'; end; end; end
VFP
*** AddEvent event - Notifies your application once the a new event is added. *** LPARAMETERS Ev with thisform.Schedule1 .SelectEventStyle = 48 .DefaultEventLongLabel = "" .DefaultEventShortLabel = "" .CreateEventLabel = "" .Calendar.Selection = {^2001-1-10} .OnResizeControl = 3073 with .Events with .Add({^2001-1-10 9:00:00},{^2001-1-10 12:30:00}) .Editable = 3 .LongLabel = "just your label" endwith with .Add({^2001-1-10 10:00:00},{^2001-1-10 13:00:00}) .Editable = 3 .LongLabel = "just another label" endwith endwith endwith
dBASE Plus
/* with (this.ACTIVEX1.nativeObject) AddEvent = class::nativeObject_AddEvent endwith */ // Notifies your application once the a new event is added. function nativeObject_AddEvent(Ev) local oSchedule oSchedule = form.Activex1.nativeObject return local oSchedule,var_Event,var_Event1,var_Events oSchedule = form.Activex1.nativeObject oSchedule.SelectEventStyle = 48 oSchedule.DefaultEventLongLabel = "" oSchedule.DefaultEventShortLabel = "" oSchedule.CreateEventLabel = "" oSchedule.Calendar.Selection = "01/10/2001" oSchedule.OnResizeControl = 3073 /*exResizePanelRight | exCalendarFit | exCalendarAutoHide*/ var_Events = oSchedule.Events var_Event = var_Events.Add("01/10/2001 09:00:00","01/10/2001 12:30:00") var_Event.Editable = 3 var_Event.LongLabel = "just your label" var_Event1 = var_Events.Add("01/10/2001 10:00:00","01/10/2001 13:00:00") var_Event1.Editable = 3 var_Event1.LongLabel = "just another label"
XBasic (Alpha Five)
' Notifies your application once the a new event is added. function AddEvent as v (Ev as OLE::Exontrol.Schedule.1::IEvent) Dim oSchedule as P oSchedule = topparent:CONTROL_ACTIVEX1.activex end function Dim oSchedule as P Dim var_Event as P Dim var_Event1 as P Dim var_Events as P oSchedule = topparent:CONTROL_ACTIVEX1.activex oSchedule.SelectEventStyle = 48 oSchedule.DefaultEventLongLabel = "" oSchedule.DefaultEventShortLabel = "" oSchedule.CreateEventLabel = "" oSchedule.Calendar.Selection = {01/10/2001} oSchedule.OnResizeControl = 3073 'exResizePanelRight + exCalendarFit + exCalendarAutoHide var_Events = oSchedule.Events var_Event = var_Events.Add({01/10/2001 09:00:00},{01/10/2001 12:30:00}) var_Event.Editable = 3 var_Event.LongLabel = "just your label" var_Event1 = var_Events.Add({01/10/2001 10:00:00},{01/10/2001 13:00:00}) var_Event1.Editable = 3 var_Event1.LongLabel = "just another label"
Visual Objects
METHOD OCX_Exontrol1AddEvent(Ev) CLASS MainDialog // AddEvent event - Notifies your application once the a new event is added. RETURN NIL local var_Event,var_Event1 as IEvent local var_Events as IEvents oDCOCX_Exontrol1:SelectEventStyle := exLinesSolid oDCOCX_Exontrol1:DefaultEventLongLabel := "" oDCOCX_Exontrol1:DefaultEventShortLabel := "" oDCOCX_Exontrol1:CreateEventLabel := "" oDCOCX_Exontrol1:Calendar:Selection := SToD("20010110") oDCOCX_Exontrol1:OnResizeControl := exResizePanelRight | exCalendarFit | exCalendarAutoHide var_Events := oDCOCX_Exontrol1:Events var_Event := var_Events:Add(SToD("20010110 09:00:00"),SToD("20010110 12:30:00")) var_Event:Editable := exEditLongLabel var_Event:LongLabel := "just your label" var_Event1 := var_Events:Add(SToD("20010110 10:00:00"),SToD("20010110 13:00:00")) var_Event1:Editable := exEditLongLabel var_Event1:LongLabel := "just another label"
PowerBuilder
/*begin event AddEvent(oleobject Ev) - Notifies your application once the a new event is added.*/ /* OleObject oSchedule oSchedule = ole_1.Object */ /*end event AddEvent*/ OleObject oSchedule,var_Event,var_Event1,var_Events oSchedule = ole_1.Object oSchedule.SelectEventStyle = 48 oSchedule.DefaultEventLongLabel = "" oSchedule.DefaultEventShortLabel = "" oSchedule.CreateEventLabel = "" oSchedule.Calendar.Selection = 2001-01-10 oSchedule.OnResizeControl = 3073 /*exResizePanelRight | exCalendarFit | exCalendarAutoHide*/ var_Events = oSchedule.Events var_Event = var_Events.Add(DateTime(2001-01-10,09:00:00),DateTime(2001-01-10,12:30:00)) var_Event.Editable = 3 var_Event.LongLabel = "just your label" var_Event1 = var_Events.Add(DateTime(2001-01-10,10:00:00),DateTime(2001-01-10,13:00:00)) var_Event1.Editable = 3 var_Event1.LongLabel = "just another label"