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

Event height - row spacing

1 Answer 48 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 07 Jan 2016, 01:33 PM

Hi,

 

how to define row  spacing between events in Week view? Also how to split one event through multiply lines?

 

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Accepted
Sophi
Telerik team
answered on 08 Jan 2016, 11:56 AM
Hello Cico,

In order to apply row spacing on the event entries in your calendar, you should conform to the TKCalendarDelegate protocol and implement the calendar:updateVisualsForCell:. 
Consider the code below.
-(void)calendar:(TKCalendar *)calendar updateVisualsForCell:(TKCalendarCell *)cell
{
    if ([cell isKindOfClass:[TKCalendarDayCell class]]) {
        ((TKCalendarDayCell*)cell).style.eventSpacing = 25;
    }
}

By default every event is drawn on a separate line, in case you want to perform some custom alignment like separating an event you should create a custom cell inhering from TKCalendarDayCell and override the drawEventsAsText:rect: method where you can specify the way you want the events to be drawn.

Hope this helps.
In case you have any other questions or concerns do not hesitate to contact us.

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