Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Custom draw events are not invoking their delegate (Read 3098 times)
tomk
YaBB Newbies
*
Offline


Yaos!

Posts: 29
Joined: Apr 25th, 2006
Custom draw events are not invoking their delegate
Apr 27th, 2006 at 6:36pm
Print Post  

Working in a Timetable view mode, I have set custom draw to CustomDrawElements.CalendarItem.  This was working fine for several weeks.  I have created my own Item class and was able to delegate the task of drawing it to a subclass of your Calendar control which contains my customizations.  This subclass subscribes to its own Draw event and previously was peforming perfectly.

However over the last few days the custom drawing is no longer occurring.  I have stepped through the code and I can assure that:
    CustomDraw is still correctly set at runtime to CalendarItem
    The delegates are registered in the invocation list in the Calendar control.  I have checked them in the watch
    I have breakpoints set in the very first line of each delegate I am using to catch and perform the custom drawing
    The breakpoints are never hit, e.g. the custom draw code is not being invoked


Can you think of any way I can figure out what is causing this to happen?  Is there any internal error state or similar I can check for?  Any other property or setting I am missing which inadvertantly changed from the previous state when the drawing code worked as expected?

I have already tried changing where I catch the draw event to the parent form of the control, and it didn't work.  I have also tried setting custom draw to "All" and other combinations, to no avail.

Thanks for any help in this
  
Back to top
 
IP Logged
 
tomk
YaBB Newbies
*
Offline


Yaos!

Posts: 29
Joined: Apr 25th, 2006
Re: Custom draw events are not invoking their dele
Reply #1 - Apr 27th, 2006 at 7:06pm
Print Post  

I see that Schedule Item works, not CalendarItem.  I never had it set to Schedule Item before.  Very strange that it ever worked!  But anyway sorry to bother.  I didn't realize that CalendarItem was meant for all-day items when in Timetable view mode. Embarrassed
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Custom draw events are not invoking their dele
Reply #2 - Apr 28th, 2006 at 5:03am
Print Post  
Indeed CalendarItem was meant for the all-day items in the Timetable view and for the items in all other views (except ResourceView), while ScheduleItem was intended only for non all-day items in the Timetable view. I agree that the names of these enums might not be quite explanatory, but we are open for any renaming suggestions.

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