Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic TimetableSettings.GeneralFormat doesn't do anythin (Read 6471 times)
Jeffry
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 26
Joined: Feb 9th, 2007
TimetableSettings.GeneralFormat doesn't do anythin
Jan 21st, 2008 at 11:14am
Print Post  
Hi,

I'm working with release 4.2 of PocketPlanner. I noticed that although I set the TimetableSettings.GeneralFormat to a certain format using:
calendar1.TimetableSettings.GeneralFormat = DateTimeFormatInfo.CurrentInfo.ShortTimePattern;

It doesn't use this format.

I tracked it down to the ScheduleCell.DrawTimeLineV method where it looks for a value "round". If round then it uses settings.HourFormat for the hour and "00" or AM/PM for the minutes.

If round=false, then it uses the GeneralFormat property.

I was able to fix it by setting GroupHours to false. However, I would like to know if this is expected behavior.

I would like to have one place where I set the datetime format, i.e. the GeneralFormat property and not have to worry about also setting other properties like TwelveHourFormat.

Also, maybe related to this. I changed the GroupHours from true to false to fix the problem and nothing further changed in my timetable view. It still shows one hours per cell like I defined.

What is the effect of setting GroupHours to true?

Thanks,
Jeffry
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: TimetableSettings.GeneralFormat doesn't do any
Reply #1 - Jan 21st, 2008 at 11:27am
Print Post  
GroupHours' effect can be observed only when the CellTime property is set to less than an hour. Additionally the CellTime value should divide one hour completely (for example: 1, 2, 5, 10, 15, 20 or 30 minutes). When these conditions are met, the timeline displays a single label for the hour and several labels representing the minutes in each individual cell, corresponding to that hour.

Because of this, GeneralFormat cannot be applied in this case since the hours and minutes are displayed separately and they require different formatting.

I hope this explains the behavior you have noticed.

Meppy
  
Back to top
 
IP Logged
 
Jeffry
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 26
Joined: Feb 9th, 2007
Re: TimetableSettings.GeneralFormat doesn't do any
Reply #2 - Jan 21st, 2008 at 11:34am
Print Post  
Ok, so when I have the CellTime set to one hour, then I can just set GroupHours to disabled and then it uses the GeneralFormat.

BTW, I noticed that 13:00 displays fine, but 1:00 PM takes up too much space and PM is on the next line. How do I solve that?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: TimetableSettings.GeneralFormat doesn't do any
Reply #3 - Jan 21st, 2008 at 12:58pm
Print Post  
Quote:
Ok, so when I have the CellTime set to one hour, then I can just set GroupHours to disabled and then it uses the GeneralFormat.

Yes.

Quote:
BTW, I noticed that 13:00 displays fine, but 1:00 PM takes up too much space and PM is on the next line. How do I solve that?

Have you tried to increase the size of the timeline (through the Calendar.TimetableSettings.TimelineSettings.Size property).

Meppy
  
Back to top
 
IP Logged
 
Jeffry
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 26
Joined: Feb 9th, 2007
Re: TimetableSettings.GeneralFormat doesn't do any
Reply #4 - Jan 21st, 2008 at 1:20pm
Print Post  
Indeed it was the TimelineSettings.TimelineSize property.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint