Jump to content

UnimCalendarPanel : How to add/change calendars


khuemmeler

Recommended Posts

Hello all,
when I create new calendars in the IDE or add the calendars dynamically in the program,
no single calendar appears in the calendar overview (calendar panel - top left menu).
However, UnimCalendarPanel1.Calendars.Count shows the correct number of the added calendars.

If I don't change anything on UnimCalendarPanel, the 4 default calendars are shown in the overview. 
But UnimCalendarPanel1.Calendars.Count shows 0 calendars.
Changing the title of a default calendar generates a runtime error.

What am I doing wrong? Is there a code snippet that shows adding a calendar?

Many greetings
Klaus

Link to comment
Share on other sites

Hi Sherzod,

Version is: Complete_Professional_1.90.0.1554

Using TUnimPanel without modification shows four calendars (Default-1 (red), Default-2 (blue) ...).

If I add one or more calenders using the IDE (Property Editor for UnimCalendarPanel1, Calendars, Add...) or
if I do this programmatically 

var
  c : TUniCalendarItem;
begin
//  UnimCalendarPanel1.Calendars.Clear;
  c := UnimCalendarPanel1.Calendars.Add;
  c.Title := 'TestCal';
  c.CalendarId := 1;
  c.Color := clLime;
  c.Description := 'Appointments';

there is no calendar displayed and it's also not possible (means not being displayed) to add events to the new calendar.

And I'm wondering about the fact, that the calendars.count is zero for the 4 default calendars,

but count is correct, if I add the calendars in the above way.

So I hope to get a code-snipped which shows me how to add calendars the right way.

Best regards

Klaus 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...