Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
535
How to change the Appointment Height to fit the text inside subject
posted

Hi,

I want to diplay a  Multiline subject : 

I used a customfilter to do that supplied earlier in this site.

How can i do that correctly ?

I want to apply a padding on the  text displayed inside the appointment

Check the file  result.png in the  attached file to get an idea for the result i need.

thx

WTLV_FitAppointmentSubject.rar
  • 469350
    Verified Answer
    Offline posted

    Hi Michel,

    I'm not exactly sure what your question is. Your sample places multi-line text into the Subject of an appointment. The CreationFilter sizes the appointment element so it's big enough to fit the text. But this isn't working quite right because this code is not accounting for the borders, for one thing. And for another, it's using the exact size of the text as the size of the AppointmentUIElement. So you would need to add in some extra padding of whatever size you want. And also account for the borders of the subject, if there are any.

    The code you have here looks to me like a quick sample someone threw together just to get you on the right track. This code is making a lot of assumptions. For example, it's assuming that the Subject is being drawn using the control's Font and not some other font assigned by an Appearance of via AppStylist. It also seems like it's making some assumptions about other appointments in the same day.

    What you are trying to do here is very complicated. I'm not sure what the requirement are for your application or what assumptions you can make here about your application. If you have a specific question about one particular part of this, I can try to assist you, but I'm afraid writing fully-functional code that handles multi-line text in an appointment subject in all possible cases is beyond the scope of support. That would be a feature request.