Calendar Control

"Michael Pilecki" <[email protected]> Fri, 31 Dec 2004 20:27:29 +1000
Newsgroups gmane.comp.lib.wxwindows.wxnet
Message-ID <000001c4ef23$55322520$0202a8c0@MPPDEVEL>
Hi All,

I am trying to use the CalendarCtrl and getting some confusing results. I
have declared the control as

CalendatCtrl testcalendar = new CalendarCtrl(MainPanel,ID_CALENDAR
,DateTime.Today ,new Point(10,10), new
Size(200,200),CalendarCtrl.wxCAL_MONDAY_FIRST | wxBORDER_SUNKEN  ,"Test
Calendar");

EVT_CALENDAR_DOUBLECLICKED( ID_CALENDAR, new
EventListener(calDouble_Click));

public void calDouble_Click(object sender, Event e)
{
	wx.CalendarCtrl  CalDay = (wx.CalendarCtrl) e.EventObject;
	diary.SetColLabelValue(0,CalDay.Date.ToLongDateString());
}

It appears correctly on the Panel BUT when I double click on a date it gives
the previous month i.e. Panel 30/12/2004 but result in CalDay gives me
30/11/2004.

Is there a bug in the Calendar Control or I am just missing something.

Thanks

Michael







-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt