Print Page | Close Window

CalCtrl.Opetions.EnableInPlaceCreateEvent

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=12798
Printed Date: 16 November 2024 at 5:06pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CalCtrl.Opetions.EnableInPlaceCreateEvent
Posted By: BVoon
Subject: CalCtrl.Opetions.EnableInPlaceCreateEvent
Date Posted: 25 November 2008 at 11:22pm
I am trying to get the calendar control to use a custom form for adding appointment/event into the database.  I like to have the "Click to add appointment" feature to be disabled.

  I used the CalendarControl.Options.EnableInPlaceCreateEvent = False
and also the CalendarControl.Options.EnableAddNewTooltip = False

  all have no effect on the control.

Any help is very much appreciated.


-------------
nothingcool



Replies:
Posted By: BVoon
Date Posted: 26 November 2008 at 7:32pm
I found out that it will only work when the Provider=Custom

-------------
nothingcool


Posted By: SteveStraley
Date Posted: 09 March 2009 at 10:27pm
Hi,

did you find a way to do this for the native access provider?


Posted By: mdoubson
Date Posted: 11 March 2009 at 9:31pm
Guys, you need to spend some time analyzing sample code.
e.g. in VB CalendarSample
apply in Form Load function
 
    CalendarControl.Options.EnableInPlaceCreateEvent = False
    CalendarControl.Options.EnableAddNewTooltip = False
and disable NON-CONTROL but APP action:
Private Sub CalendarControl_DblClick()
    Dim HitTest As CalendarHitTestInfo
    Set HitTest = CalendarControl.ActiveView.HitTest
   
    Dim Events As CalendarEvents
    If Not HitTest.HitCode = xtpCalendarHitTestUnknown Then
     '   Set Events = CalendarControl.DataProvider.RetrieveDayEvents(HitTest.ViewDay.Date)
    End If
   
'    If HitTest.ViewEvent Is Nothing Then
'        mnuNewEvent_Click
'    Else
'        ModifyEvent HitTest.ViewEvent.Event
'    End If
End Sub
you will have 100% disable event creation or modification.
 
If instead of commented code you will use your own code with your logic - you will reach that you like.
 
 


-------------
Mark Doubson, Ph.D.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net