lema Posted October 3, 2020 Posted October 3, 2020 Hello, to all. Is any way to set a CalendarPanel "readOnly" ? I want to develop an application that only shows the events to the web user. I don't want the user to interact with CalendarPanel (like resize, move, or other actions). I am using Delphi 10.2 and uniGUI 1.50.0.1481. Thank you and stay safe ! PS. The following, doesn't seem to work. Quote
Sherzod Posted October 3, 2020 Posted October 3, 2020 2 hours ago, lema said: and uniGUI 1.50.0.1481. Hello, Can you upgrade to the latest build? Quote
lema Posted October 3, 2020 Author Posted October 3, 2020 2 hours ago, Sherzod said: Hello, Can you upgrade to the latest build? Hello dear Sherzod. The upgrade to the latest build, of course, is into my next future goals. I am one of the oldest UniGui users and now, I am just try to enter again into Delphi web development. The CalendarPanel is a proof of concept for a potential project. Quote
Sherzod Posted October 3, 2020 Posted October 3, 2020 54 minutes ago, lema said: The CalendarPanel is a proof of concept for a potential project. Hello! I will try one of these days to install your build and check. Quote
lema Posted October 3, 2020 Author Posted October 3, 2020 13 minutes ago, Sherzod said: Hello! I will try one of these days to install your build and check. Thank you ! Actually, I can't figure out where to put this code.... UniCalendarPanel1 -> ClientEvents -> ExtEvents ... function eventmove(sender, rec, eOpts) { return false } Quote
lema Posted October 7, 2020 Author Posted October 7, 2020 Hello ! Although, I can suspend the events via : UniSession.AddJS(UniCalendarPanel1.JSName + '.events.eventmove.suspend()'); I would like to set whole component into ReadOnly mode. My will is not to leave user to interact with CalendarPanel. Is that possible? Running on latest uniGUI v.1.90.0.1537 (Delphi 10.2). Quote
lema Posted October 8, 2020 Author Posted October 8, 2020 Hello again. In case that it can't be set "readonly", is there any other workaround? eg. How can I drop a transparent mask or panel in front of the calendarpanel? Quote
Sherzod Posted October 9, 2020 Posted October 9, 2020 On 10/7/2020 at 11:20 AM, lema said: Running on latest uniGUI v.1.90.0.1537 (Delphi 10.2). Hi, Did you upgrade to the latest build? Quote
lema Posted October 9, 2020 Author Posted October 9, 2020 3 hours ago, Sherzod said: Hi, Did you upgrade to the latest build? Yeap ! Quote
jasonhankin Posted May 3, 2021 Posted May 3, 2021 Hello. New user here. Is there a definitive answer on this one? I need the user to only be able to see but not move the events on the calendar panel.. Thanks, Quote
Joseph Joestar Posted July 24, 2024 Posted July 24, 2024 Hi, I did: procedure TForm1.calPaneEventMove( Sender: TUniCalendarPanel; AEventId: Integer; AEvent: TUniCalendarEvent; AStartDate, AEndDate: TDateTime; var Handled: Boolean); begin Handled := true; //blocking of block move end; procedure TForm1.calPaneEventResize( Sender: TUniCalendarPanel; AEventId: Integer; AEvent: TUniCalendarEvent; AStartDate, AEndDate: TDateTime; var Handled: Boolean); begin Handled := true; //blocking of block resize end; and when I move or resize, it goes back to its previous position. Quote
lema Posted February 4 Author Posted February 4 On 7/24/2024 at 10:42 AM, Joseph Joestar said: Hi, I did: procedure TForm1.calPaneEventMove( Sender: TUniCalendarPanel; AEventId: Integer; AEvent: TUniCalendarEvent; AStartDate, AEndDate: TDateTime; var Handled: Boolean); begin Handled := true; //blocking of block move end; .... and when I move or resize, it goes back to its previous position. Hello ! I'm also using the solution with Handled := true, but is there a way to completely prevent resizing or moving the event? Quote
lema Posted February 10 Author Posted February 10 I'm replying to myself... The only thing I could find is the following. It seems to meet my needs. .x-calendar-event { pointer-events: none !important; } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.