Bolded dates in MonthCalendar

L

Lonifasiko

Hi,

I would like to change/add/delete bolded dates in MonthCalendar control
but I'm not able to do it. I've tried setting a new DateTime array to
BoldedDates property, but many times I receive an "IndexOutOfRange"
exception, and others, monthcalendar control simply does not show the
new bolded dates. Has anybody tried this before?

I know this control has got "AddBoldedDates" method in Winforms, but CF
hasn't. Any tricky way or thir party control that can do that for me?

I'm using MonthCalendar control from System.Windows.Forms because it's
que unique monthcalendar control in which changing its font, I've
achieved the control to be bigger.

I've laso tried MonthCalendar from OpenNETCF but I've read a post from
Peter Foot where he says "BoldedDates", "AnnuallyBoldedDates" and
"MonthlyBoldedDates" properties have not still been implemented.


Thanks very much in advance.
 
L

Lonifasiko

Hi Peter,

Just before this post, I downloaded SDF 2.0 Beta1 and tried new
MonthCalendar2 control. I've noticed OpenNETCF team has added
DateSelected event and that BoldedDates can be set now wihout problems.


BoldedDates was not working for MonthCalendar from CF 2.0, and neither
for SDF v1.4. I tried changing the code that designer automatically
generates and after, for example, in "Load" event of the form:

this.monthCalendar1.BoldedDates = new System.DateTime[] {
new System.DateTime(2005, 10, 12, 0, 0, 0, 0),
new System.DateTime(2005, 10, 31, 0, 0, 0, 0),
new System.DateTime(2005, 11, 1, 0, 0, 0, 0),
new System.DateTime(2005, 12, 6, 0, 0, 0, 0),
new System.DateTime(2005, 12, 8, 0, 0, 0, 0)};

With this automatically generated code, BoldedDates are not shown in
the calendar control. And if you delete/add one item of this DateTimes
array, IndexOutOfRange exception is thrown. If you change one datetime
value, bolded dates are not shown.

Don't worry because as I've told you SDF 2.0 covers this functionality.

Regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top