Selected Event
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=16588
Printed Date: 02 January 2025 at 10:25am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Selected Event
Posted By: cannones
Subject: Selected Event
Date Posted: 14 April 2010 at 11:47am
Hi All,
How does one know if the area of the calendar which is selected is on an existing event or not. When a user right mouse clicks on an area of the calendar I want to be able to check if an event exists below or not before displaying valid options in a popup menu..
Regards, Sam
|
Replies:
Posted By: SuperMario
Date Posted: 14 April 2010 at 1:13pm
Private Sub CalendarControl_ContextMenu(ByVal X As Single, ByVal Y As Single)
Debug.Print "On context menu" Dim EventID As Integer Dim HitTest As CalendarHitTestInfo Set HitTest = CalendarControl.ActiveView.HitTest If Not HitTest.ViewEvent Is Nothing Then Set ContextEvent = HitTest.ViewEvent.Event 'EventID = ContextEvent.Id Me.PopupMenu mnuContexEditEvent Set ContextEvent = Nothing ElseIf (HitTest.HitCode = xtpCalendarHitTestDayViewTimeScale) Then Me.PopupMenu mnuContextTimeScale Else Me.PopupMenu mnuContextNewEvent End If
End Sub
|
Posted By: cannones
Date Posted: 15 April 2010 at 4:14am
Thanks for this .. It seems to work okay although I cant seem to retrieve the Id of the event. Not sure why when I can retrieve all the other event properties.
Also is there a way of being able to select an appointment but not be allowed to edit or drag it. All the operations are controlled by right mouse clicking on an event which I give the user the option to open the event and view all other attributes I store against it ...
|
|