Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Disable in-place delete of events
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Disable in-place delete of events

 Post Reply Post Reply
Author
Message Reverse Sort Order
corrado View Drop Down
Groupie
Groupie


Joined: 21 December 2009
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote corrado Quote  Post ReplyReply Direct Link To This Post Topic: Disable in-place delete of events
    Posted: 23 December 2009 at 8:41pm
wlcabral,
 
Thanks a lot for your advice.
At the moment I use KeyDown event to filter Delete key pressed and that works fine for me.
Your solution must be better and I will give it a try later on.
 
Back to Top
wlcabral View Drop Down
Groupie
Groupie
Avatar

Joined: 25 April 2007
Location: Brazil
Status: Offline
Points: 72
Post Options Post Options   Thanks (0) Thanks(0)   Quote wlcabral Quote  Post ReplyReply Direct Link To This Post Posted: 23 December 2009 at 5:40pm

Try the code bellow (written in FOXPRO) in BeforeEditOperation event

 

Pocedure BeforeEditOperation

parameters opparams, bcanceloperation

 

Do Case

                    Case opparams.operation = xtpCalendarEO_DragMove Or ;

                                         opparams.operation = xtpCalendarEO_DragResizeBegin

                    Case opparams.operation = xtpCalendarEO_InPlaceCreateEvent

                                        This.Parent.lInPlaceCreatingEvent = .T.

                    Case opparams.operation = xtpCalendarEO_DeleteSelectedEvents

                                        If opparams.EventViews.Count > 1

                                                            cMsg = "deseja excluir os eventos selecionados"

                                        Else

                                                            cMsg = "deseja excluir o evento selecionado"

                                        Endif

                                        If Messagebox(cMsg,4+32) != 6

                                                            bcanceloperation = .T.

                                        endif

                                        This.Parent.lInPlaceCreatingEvent = .F.

                    otherwise

                                       

Endcase                                                                                             

wlcabral
Back to Top
corrado View Drop Down
Groupie
Groupie


Joined: 21 December 2009
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote corrado Quote  Post ReplyReply Direct Link To This Post Posted: 21 December 2009 at 8:20pm
Is it possible to disable only deleting of selected event by pressing DELETE key (or at least having a confirmation message before deletion)?
I want to be able to add and edit events by clicking calendar.
 
Thank you
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.219 seconds.