Event height - row spacing

Thread is closed for posting
2 posts, 1 answers
  1. Cico
    Cico avatar
    3 posts
    Member since:
    Dec 2015

    Posted 07 Jan 2016 Link to this post



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


    Thanks in advance

  2. Answer
    Sophi avatar
    103 posts

    Posted 08 Jan 2016 Link to this post

    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.

    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
Back to Top