Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to make it so items are uneditable (Read 1802 times)
Michael Hopkins
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 23
Joined: Apr 5th, 2022
How to make it so items are uneditable
Apr 22nd, 2022 at 6:18pm
Print Post  
We want to make it so the items on the calendar are not able to be edited or draggable or resized. I tried to do the following.

Code (Java)
Select All
calendar.setAllowDrag(false);
calendar.setAllowInplaceCreate(false);
calendar.setAllowInplaceEdit(false);
calendar.setAllowMoveUnselectedItems(false);
calendar.setAllowAutoScroll(false); 



But I was still able to drag and resize the item. What am I missing?

UPDATE:

I was able to suppress the dragging and resizing by catching the itemClick event and calling calendar.resetDrag(). It will still change the cursor when you hover an edge to the resize cursor as though it can be edited though... Seems like there is still something I am missing.

Is there a difference between setting items as non editable on the month view vs the timetable view. I am working items on a timetable view and I don't want them to be moved around or resized at all.
« Last Edit: Apr 22nd, 2022 at 11:12pm by Michael Hopkins »  
Back to top
 
IP Logged
 
Slavcho
God Member
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: How to make it so items are uneditable
Reply #1 - Apr 25th, 2022 at 5:49am
Print Post  
Try item.setLocked(true);

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Michael Hopkins
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 23
Joined: Apr 5th, 2022
Re: How to make it so items are uneditable
Reply #2 - Apr 25th, 2022 at 3:28pm
Print Post  
That worked. Thank you. Smiley
  
Back to top
 
IP Logged
 
Bruno Dufour
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 15
Joined: Jul 28th, 2022
Re: How to make it so items are uneditable
Reply #3 - Aug 1st, 2022 at 10:05pm
Print Post  

I tried Appointment.setLock(true), and I still able to edit text. I missed something ?
  
Back to top
 
IP Logged
 
Slavcho
God Member
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: How to make it so items are uneditable
Reply #4 - Aug 2nd, 2022 at 1:31pm
Print Post  
setLocked prevents changing item's date. You could prevent editing text by handling CalendarListener.itemInplaceEditStarting event.
  
Back to top
 
IP Logged
 
Bruno Dufour
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 15
Joined: Jul 28th, 2022
Re: How to make it so items are uneditable
Reply #5 - Aug 2nd, 2022 at 6:57pm
Print Post  
Calendar member :      
setAllowInplaceEdit

works for me.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint