Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Reading Item bounds from TimeTable (Read 4703 times)
Brian O'Neil
Guest


Reading Item bounds from TimeTable
Apr 5th, 2006 at 7:56pm
Print Post  
I have a question about interacting with an item.  I am trying to get the bounds of an item that is displayed on the timetable. 

The only way that I have found to get it is in attaching to the Draw of the calendar and getting it from there, but the rect is not on the calendar coordinates (client point) or the screen coordinates (Screen point) so I can't use just the rect to draw something or resize the custom editor that I have for an item. 

Is there another way to get the bounds of an item if I have a reference to the item?

thanks,

Brian O'Neil
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Reading Item bounds from TimeTable
Reply #1 - Apr 6th, 2006 at 5:56am
Print Post  
Currently it is not possible to retrieve the bounds of an item. We can add a Bounds property to the next version, which is being released at the end of April. If you need this urgently, we can send you our daily build of the dll once the property is implemented.

Meppy
  
Back to top
 
IP Logged
 
Brian O'Neil
Guest


Re: Reading Item bounds from TimeTable
Reply #2 - Apr 6th, 2006 at 11:44am
Print Post  
That property would be very helpful.  It would also be helpful to know when the bounds of the item are changing, but I could pretty much figure that out by checking the bounds when an item is being painted (not that efficient, but it would probably work).

I would like to get a pre-release if possible just so we can start coding against it. 

Thank you again for the fast response.

-Brian
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Reading Item bounds from TimeTable
Reply #3 - Apr 6th, 2006 at 1:11pm
Print Post  
My colleague will send you a link to the new version by the end of the day. Keep in mind that this is a preliminary version and some features might still not work correctly.

In order to obtain the bounding rectangle of an item in the new version, use the method Calendar.GetItemBounds(Item). The returned rectangle is relative to the top-left corner of the control.

Meppy
« Last Edit: Apr 6th, 2006 at 3:48pm by Meppy »  
Back to top
 
IP Logged
 
Brian O'Neil
Guest


Re: Reading Item bounds from TimeTable
Reply #4 - Apr 6th, 2006 at 5:23pm
Print Post  
got it and already tested it and it works for what I needed. 

Thank you again!

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