Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic DateStyle in PocketPlanner (Read 3702 times)
Martin Gravråk
Guest


DateStyle in PocketPlanner
May 22nd, 2006 at 9:01am
Print Post  
Is there anything similar to DateStyle in Pocket planner? (I need a way to show icons, or at least different colours for some of the days in the month view)
  
Back to top
 
IP Logged
 
Martin Gravråk
Guest


Re: DateStyle in PocketPlanner
Reply #1 - May 22nd, 2006 at 9:17am
Print Post  
Embarrassed found it
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: DateStyle in PocketPlanner
Reply #2 - May 22nd, 2006 at 9:21am
Print Post  
Yes, there is exactly the same construct in PocketPlanner. You create an instance of the DateStyle class, set the range of dates this style would be applied to and set the style itself, then add it to the Calendar.DayStyles list. The following code illustrates how to do this.

Code
Select All
DateStyle customStyle = new DateStyle();
customStyle.From = new DateTime(2006, 5, 24);
customStyle.To = new DateTime(2006, 5, 24);
customStyle.Style.ImageIndex = 0;
calendar.DayStyles.Add(customStyle); 


This sample assumes an image list with at least one image in it is associated with the calendar through the Calendar.ImageList property. Of course you can  set an image directly to the Style.Image property or do any desired customization with the style.

I hope this helps.

Meppy
  
Back to top
 
IP Logged
 
Martin Gravråk
Guest


Re: DateStyle in PocketPlanner
Reply #3 - May 22nd, 2006 at 9:35am
Print Post  
works like a charm!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint