Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Timetable view hour formatting (Read 3697 times)
andyw
YaBB Newbies
*
Offline



Posts: 6
Joined: May 31st, 2011
Timetable view hour formatting
Sep 13th, 2011 at 8:58pm
Print Post  
I want to show the hours across the top of a calendar timetable view formatted according to the regional settings, e.g.
"HH:mm" shows from 9am: "09, 10, 11, 12, 13..."
"H:mm" shows : "9, 10, 11, 12, 13 ..."
"hh:mm" shows: "09, 10, 11, 12, 01"
"h:mm: shows : "9, 10, 11, 12, 1..."

I am only showing the hours, any minutes are being hidden by setting TimelineStyle.TextColor as suggested here: http://mindfusion.eu/Forum/YaBB.pl?board=calnet_disc;action=display;num=13068686.... How do I do this and perhaps I should ask why doesn't it do this automatically?

ATM I am setting the TwelveHourFormat property according to the settings but I never get any leading zeroes if dictated by the regional settings.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Timetable view hour formatting
Reply #1 - Sep 14th, 2011 at 6:05am
Print Post  
Currently the only way to affect how hours are displayed in the timeline (apart from custom drawing) is through the TwelveHourFormat property. We have done this for simplicity and unfortunately there are some cases, which are not covered.

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



Posts: 6
Joined: May 31st, 2011
Re: Timetable view hour formatting
Reply #2 - Sep 14th, 2011 at 11:59am
Print Post  
Hmm. Well I am happy to use a custom drawing method but the Text property (and all the others for that) of the DrawEventArgs class are readonly. So how can I change the text that is shown using custom drawing?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Timetable view hour formatting
Reply #3 - Sep 14th, 2011 at 12:12pm
Print Post  
The intent of the custom drawing is not to customize the values of various properties. The idea is to allow users to draw directly on top of various calendar elements. To do the drawing simply invoke the methods of the supplied graphics object. In this particular case you can draw a text in the desired format inside the timeline cells.

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



Posts: 6
Joined: May 31st, 2011
Re: Timetable view hour formatting
Reply #4 - Sep 14th, 2011 at 2:02pm
Print Post  
OK thanks. Hiding the underlying timeline hours by setting the TimelineStyle.HeaderTextColor = Color.Transparent presumably?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Timetable view hour formatting
Reply #5 - Sep 14th, 2011 at 2:16pm
Print Post  
Precisely. Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint