This is a migrated thread and some comments may be shown as answers.

Calendar Month Presenter event color

1 Answer 69 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Msoft
Top achievements
Rank 1
Msoft asked on 15 Feb 2016, 01:46 PM

     Hi,

 how to change textcolor or events in Month Presenter view? Background color is set using TKCalendarEvent.eventColor, but Text Color is always black.

 

Thank you

 

1 Answer, 1 is accepted

Sort by
0
Sophi
Telerik team
answered on 18 Feb 2016, 08:51 AM
Hi Cico,

You are able to apply specific event color for every cell depending on it's state.
Conform to the TKCalendarDelegate protocol and implement the calendar:updateVisualsForCell: method which provides you with every cell instance used in the calendar, this way you can customize the cells entirely.
You should use the eventTextColor or allDayEventTextColor properties of the cell's style.
Consider the following code snippet.
- (void)calendar:(TKCalendar*)calendar updateVisualsForCell:(TKCalendarCell*)cell;
{
    if ([cell isKindOfClass:[TKCalendarDayCell class]]) {
        ((TKCalendarDayCellStyle*)cell.style).eventTextColor= [UIColor greenColor];
        ((TKCalendarDayCellStyle*)cell.style).allDayEventTextColor = [UIColor purpleColor];
     }
}

I hope this helps you.

Regards,
Sophi
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Calendar
Asked by
Msoft
Top achievements
Rank 1
Answers by
Sophi
Telerik team
Share this question
or