FlavioMacedo Posted December 15, 2022 Share Posted December 15, 2022 Good Morning. Is there any way / property to change the color of unicalendar events at runtime? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 15, 2022 Share Posted December 15, 2022 23 minutes ago, FlavioMacedo said: Is there any way / property to change the color of unicalendar events at runtime? Hello, Try this approach: procedure TMainForm.UniButton1Click(Sender: TObject); begin with UniCalendarPanel1 do begin Calendars[0].DefaultColor := False; Calendars[0].Color := clYellow; JSInterface.JSCall('calendarStore.reload', []); end; end; Quote Link to comment Share on other sites More sharing options...
FlavioMacedo Posted December 15, 2022 Author Share Posted December 15, 2022 This changes the color of the calendar. I would need to change the color for different events on the same calendar. Would? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 15, 2022 Share Posted December 15, 2022 6 minutes ago, FlavioMacedo said: I would need to change the color for different events on the same calendar. Please explain in more detail. Quote Link to comment Share on other sites More sharing options...
FlavioMacedo Posted December 15, 2022 Author Share Posted December 15, 2022 In a calendar I have several types of events such as prospects and customers (there are more than 20 different types) I would like to identify each one of them in a different color. One question... Is there a limit for calendars? If there isn't one, I can start with several calendars knowing that I can have more than 20 different ones. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 16, 2022 Share Posted December 16, 2022 14 hours ago, FlavioMacedo said: One question... Is there a limit for calendars? If there isn't one, I can start with several calendars knowing that I can have more than 20 different ones. Hello, You can use this number of calendars and more, but the number of calendars is directly proportional to the time the events are loaded. Quote Link to comment Share on other sites More sharing options...
FlavioMacedo Posted December 16, 2022 Author Share Posted December 16, 2022 OK Thanks Quote Link to comment Share on other sites More sharing options...
FlavioMacedo Posted December 16, 2022 Author Share Posted December 16, 2022 Good Morning. I am having the error below. Could you tell me what I should put in the uses please. Undeclared identifier: 'JSInterface' Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 16, 2022 Share Posted December 16, 2022 Hello, Which build are you using? Quote Link to comment Share on other sites More sharing options...
FlavioMacedo Posted December 16, 2022 Author Share Posted December 16, 2022 1564 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 16, 2022 Share Posted December 16, 2022 Where are you using the code? Quote Link to comment Share on other sites More sharing options...
FlavioMacedo Posted December 16, 2022 Author Share Posted December 16, 2022 UniFrameCreate Quote Link to comment Share on other sites More sharing options...
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.