Type | Description | |||
Ev as Event | The Ev object indicates the new appointment/event being added. |
The AllowCreateEvent property specifies the keys combination to let user creates new events at runtime. The CreateEventLabel property indicates the label to be shown when the user creates a new event at runtime. You can use the Background(exScheduleCreateEventBackColor) and Background(exScheduleCreateEventForeColor) properties to specify the visual appearance of the events being updated at runtime * moving or resizing ).
Syntax for AddEvent event, /NET version, on:
private void AddEvent(object sender,exontrol.EXSCHEDULELib.Event Ev) { } Private Sub AddEvent(ByVal sender As System.Object,ByVal Ev As exontrol.EXSCHEDULELib.Event) Handles AddEvent End Sub |
private void AddEvent(object sender, AxEXSCHEDULELib._IScheduleEvents_AddEventEvent e) { } void OnAddEvent(LPDISPATCH Ev) { } void __fastcall AddEvent(TObject *Sender,Exschedulelib_tlb::IEvent *Ev) { } procedure AddEvent(ASender: TObject; Ev : IEvent); begin end; procedure AddEvent(sender: System.Object; e: AxEXSCHEDULELib._IScheduleEvents_AddEventEvent); begin end; begin event AddEvent(oleobject Ev) end event AddEvent Private Sub AddEvent(ByVal sender As System.Object, ByVal e As AxEXSCHEDULELib._IScheduleEvents_AddEventEvent) Handles AddEvent End Sub Private Sub AddEvent(ByVal Ev As EXSCHEDULELibCtl.IEvent) End Sub Private Sub AddEvent(ByVal Ev As Object) End Sub LPARAMETERS Ev PROCEDURE OnAddEvent(oSchedule,Ev) RETURN |
<SCRIPT EVENT="AddEvent(Ev)" LANGUAGE="JScript"> </SCRIPT> <SCRIPT LANGUAGE="VBScript"> Function AddEvent(Ev) End Function </SCRIPT> Procedure OnComAddEvent Variant llEv Forward Send OnComAddEvent llEv End_Procedure METHOD OCX_AddEvent(Ev) CLASS MainDialog RETURN NIL void onEvent_AddEvent(COM _Ev) { } function AddEvent as v (Ev as OLE::Exontrol.Schedule.1::IEvent) end function function nativeObject_AddEvent(Ev) return |
The following VB sample shows how you can change the event's pattern once a new event is created:
Private Sub Schedule1_AddEvent(ByVal Ev As EXSCHEDULELibCtl.IEvent) With Ev.BodyPattern .Type = exPatternBDiagonal .Color = RGB(128, 128, 128) End With End Sub
The following VB sample asks the user if he wants to keep the newly created event, and if not, removes it:
Dim iCreatingEvent As Long Private Sub Schedule1_AddEvent(ByVal Ev As EXSCHEDULELibCtl.IEvent) If Not (iCreatingEvent = 0) Then If Not MsgBox("Do you allow creating this new event?", vbQuestion Or vbYesNoCancel) = vbYes Then Schedule1.Events.Remove (Ev.Handle) End If End If End Sub Private Sub Schedule1_LayoutStartChanging(ByVal Operation As EXSCHEDULELibCtl.LayoutChangingEnum) If (Operation = exScheduleCreateEvent) Then iCreatingEvent = iCreatingEvent + 1 End If End Sub Private Sub Schedule1_LayoutEndChanging(ByVal Operation As EXSCHEDULELibCtl.LayoutChangingEnum) If (Operation = exScheduleCreateEvent) Then iCreatingEvent = iCreatingEvent - 1 End If End Sub