Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Different font for appointments (Read 4060 times)
AncaZ
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 21
Joined: Feb 16th, 2017
Different font for appointments
Mar 2nd, 2017 at 7:44am
Print Post  
Hello,

It is possible to change the font for the appointments in the JPlanner?
For example to apply the Segoe UI font.

Thank you,
Anca
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Different font for appointments
Reply #1 - Mar 2nd, 2017 at 12:08pm
Print Post  
Hi,

Use the Calendar.ItemSettings.Style.Font property to modify the font of all items in the calendar:

Code
Select All
calendar.getItemSettings().getStyle().setFont(font); 


Depending of the view you are using you may also need to set the header font (through HeaderFont property).

Regards,
Meppy
  
Back to top
 
IP Logged
 
AncaZ
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 21
Joined: Feb 16th, 2017
Re: Different font for appointments
Reply #2 - Mar 2nd, 2017 at 12:47pm
Print Post  
Hello,

Thank you.. it works for the appointments.
But what about the header, and the time on the right, can I also change the font?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Different font for appointments
Reply #3 - Mar 2nd, 2017 at 3:06pm
Print Post  
To customize the different calendar views, use the properties of the respective settings objects. For example, to customize the Timetable view, use the properties of the Calendar.TimetableSettings object. More specifically, to change the font of the various elements of the view, use the Font and HeaderFont properties located in the appropriate Style objects. For example, to change the font of the texts displayed in the timeline of a Timetable, use the Font and HeaderFont properties of the TimelineStyle object:

Code
Select All
calendar.getTimetableSettings().getTimelineStyle().setFont(...);
calendar.getTimetableSettings().getTimelineStyle().setHeaderFont(...); 


Regards,
Meppy
  
Back to top
 
IP Logged
 
AncaZ
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 21
Joined: Feb 16th, 2017
Re: Different font for appointments
Reply #4 - Mar 6th, 2017 at 12:08pm
Print Post  
Works fine.
I just don't manage to apply the font for the appointments that are an AllDayEvent.
My code to set the font for the other appointments/header/day/time is:
Code (Java)
Select All
        //Set selected appointment font
        getItemSettings().getSelectedItemStyle().setHeaderFont(new Font("Segoe UI", 10, FontStyles.Regular));
        getItemSettings().getSelectedItemStyle().setFont(new Font("Segoe UI", 10, FontStyles.Regular));


        //Set appointment font
        getItemSettings().getStyle().setHeaderFont(new Font("Segoe UI", 10,  FontStyles.Regular));
        getItemSettings().getStyle().setFont(new Font("Segoe UI", 10,  FontStyles.Regular));

        //Set font for queue title and resource
        getTimetableSettings().getStyle().setFont(new Font("Segoe UI", 10, FontStyles.Regular));
        getTimetableSettings().getStyle().setHeaderFont(new Font("Segoe UI", 10, FontStyles.Regular));

        //Set Font for time
        getTimetableSettings().getTimelineStyle().setFont(new Font("Segoe UI", 10, FontStyles.Regular));
        getTimetableSettings().getTimelineStyle().setHeaderFont(new Font("Segoe UI", 10, FontStyles.Regular));
 


After setting the font like this, the text for the all day events appointments is not visible.
Can you, please, help?
Thank you.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Different font for appointments
Reply #5 - Mar 6th, 2017 at 1:17pm
Print Post  
Hi,

The text height probably does not fit inside the item. Try increasing the size of the all-day items or reduce the font size:

Code
Select All
getItemSettings().setSize(20); 


Regards,
Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint