Calendar Control

 

Calendar Control

This control, like the Ribbon, was originally authored by Menendezpoo.com. Since it also fell short my requirements I was forced to make my own changes so it was usable in my applications.  This control was also written extreamly well which made making changes pretty simple.  It also contained a few nifty drawing functions that I ended up using in my personal controls.

After converting the code to VS2008 and working with the control, I noticed the expanded view lacked true scrollbar support.  Only the mouse wheel would scroll vertically.  I dug into the code and started working on getting the built in scrollbars to work.  Since this control inherited from ScrollableControl it internally has scrollbar support. The only problem was the logic used the time slots index as the scrolling values and not a pixel like the internal workings expected.  I would have had to totally rework all the existing scrolling logic to get the scrollbars to work.  I therefore decided to use an external scrollbar and just change the top index as the scrollbar was moved. This was just how the mouse wheel worked internally.  This eventually worked well but in order to accomplish my task I needed to expose some internal property values that were originally hidden.  After some trial and error, Voila, vertical scrollbars.

Tooltips were also lacking so that was my next hurdle.  I decided to use the standard windows tooltips so it turned out to be pretty easy.  Other than that its pretty much completed for my requirements.

Download Source (ver 3.5.0)

Version 3.5.0

  1. Added vertical scrollbar support to expanded view.  check out the demo form for the code on how to get it to work.
  2. Added tooltip support for items.
  3. Changed all the mouse events so they pass the Item by ref instead of byval so any changes made to the item in the mouse events would be updated in the item collection.