![]() |
Selected Event |
Post Reply
|
| Author | |
cannones
Groupie
Joined: 14 April 2010 Location: Australia Status: Offline Points: 16 |
Post Options
Thanks(0)
Quote Reply
Topic: Selected EventPosted: 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 |
|
![]() |
|
SuperMario
Senior Member
Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
cannones
Groupie
Joined: 14 April 2010 Location: Australia Status: Offline Points: 16 |
Post Options
Thanks(0)
Quote Reply
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 ... |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |