Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Highlight today's date on the timeline header (Read 2001 times)
SimonL
YaBB Newbies
*
Offline



Posts: 36
Joined: Aug 11th, 2006
Highlight today's date on the timeline header
Dec 20th, 2006 at 3:27pm
Print Post  
In resource view I'd like to highlight today's date on the timeline header. You described to me how to do it via custom draw but it was some time ago and I cant remember.

Can you tell me again please

Regards,
Simon
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Highlight today's date on the timeline header
Reply #1 - Dec 21st, 2006 at 8:26am
Print Post  
You have to set Calendar.CustomDraw to CustomDrawElement.ResourceViewTimelineCell and handle the Calander.Draw event. The event handler implementation should look similar to the following:

Code
Select All
private void calendar1_Draw(object sender, MindFusion.Scheduling.WinForms.CustomDrawArgs e)
{
    if (e.Element == CustomDrawElements.ResourceViewTimelineCell)
    {
	  if (e.Date.Date == DateTime.Today)
	  {
		e.Graphics.DrawRectangle(Pens.Red, e.Bounds);
	  }
    }
} 



There is a bug in the current version however, and the DateTime property of the supplied event arguments is not correct. I am gonna prepare a fix for you later and send it through e-mail.

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