Disable in-place delete of events |
Post Reply |
Author | |
corrado
Groupie Joined: 21 December 2009 Status: Offline Points: 13 |
Post Options
Thanks(0)
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
|
|
wlcabral
Groupie Joined: 25 April 2007 Location: Brazil Status: Offline Points: 72 |
Post Options
Thanks(0)
|
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
|
|
corrado
Groupie Joined: 21 December 2009 Status: Offline Points: 13 |
Post Options
Thanks(0)
|
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.
|
|
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 |