Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Getting more information about Resource Row Headers (Read 3042 times)
Achim
Junior Member
**
Offline


MindFusion rocks!

Posts: 70
Location: Bayreuth, Germany
Joined: Jun 28th, 2012
Getting more information about Resource Row Headers
Jun 29th, 2012 at 11:48am
Print Post  
Hi there,

is there any possibility to get some more information about the Resource Row Headers in the ResourceView? I want to display tooltips for the Row Headers and the only way I could imagine is to watch the MouseMove event of the Calendar-Control and then, if the mouse is over a row header, activate a tooltip component and display it.

But for this solution i have to store the bounding box coordinates of every row header relative to the form and i have no idea how to get these coordinates.

Many thanks for any hint!
Achim
  
Back to top
WWW  
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Getting more information about Resource Row Headers
Reply #1 - Jun 29th, 2012 at 12:17pm
Print Post  
The following code checks whether a point (expressed in client coordinates) lies over a resource header:

Code
Select All
Resource resource = calendar.GetResourceAt(e.X, e.Y);
if (resource != null)
{
	if (calendar.GetDateAt(e.X, e.Y) == DateTime.MinValue)
		MessageBox.Show(resource.Name);
} 


The reason behind the GetDateAt call is that GetResourceAt would return a valid resource even when the point is inside a cell associated with a resource.

I hope this helps.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Achim
Junior Member
**
Offline


MindFusion rocks!

Posts: 70
Location: Bayreuth, Germany
Joined: Jun 28th, 2012
Re: Getting more information about Resource Row Headers
Reply #2 - Jul 2nd, 2012 at 12:41pm
Print Post  
Hi Meppy,

many thanks. I could not test it today but I'm sure this will work for me.

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