Hi there,
nice thingie you MonthCalendar! Thank you for posting it here!
But I want to duplicate the behavior of hovering of the common MonthCalendar control.
So in this, the highlight coloring is only visible if the mouse has entered the control, not all the time, and got invisible, on mouse leave off the control - by now it it all the time visible ... which would not be my decision.
Was trying around and was not found the correct places to avoid creation of the highlighting background nor found a method like "drawHoveredDay".
Please tell me, how to do that or include a drawHoveredDay method to accomplish this.
Thank you very much for your nice work!
hi!
here is the code i use to mark dates in monthcalendar.dates which works good
when i use this refresh it adds more of dates, what i need is to clear them before i add them again
i used monthCalendar1.Dates.Clear(); but it did not clear the dates
does anyone have a suggestion, how to clear the dates?
C#
privatevoid kalendarRefresh()
{
// ???????? here i would like to remove all previous dates// i tried this: monthCalendar1.Dates.Clear(); //but it did not work
DataTable dttblKal;
dttblKal = classSQL.commandSQL("SELECT * FROM `tabkalendar` WHERE `IDuser` =" + classUser.ID.ToString() + " AND `StatusPoznamky` != 'Vymazaná';", 1);
DataRow drwKal;
DateItem[] d = new DateItem[dttblKal.Rows.Count];
for (int i = 0; i < dttblKal.Rows.Count; i++)
{
drwKal = dttblKal.Rows[i];
d[i] = new DateItem();
if (drwKal["StatusPoznamky"].ToString() == "Neprečítaná")
{
DateTime date = (DateTime) drwKal["DatumPoznamky"];
Int32 intYear = Convert.ToInt32(date.Year.ToString());
Int32 intMonth = Convert.ToInt32(date.Month.ToString());
Int32 intDay = Convert.ToInt32(date.Day.ToString());
d[i].Date = new DateTime(intYear, intMonth, intDay);
d[i].Background.Style = MonthCalendar.EStyle.esGradient;
d[i].Background.StartColor = Color.Goldenrod;
d[i].Background.EndColor = Color.FloralWhite;
d[i].Background.Gradient = MonthCalendar.GradientStyle.Vertical;
d[i].Border.BorderColor = Color.Gray;
d[i].Border.Visible = true;
d[i].DayAlign = ContentAlignment.MiddleCenter;
monthCalendar1.Dates.Add(d[i]);
}
}
}
you can give a day a special color how you add this to the datescollection from the dates - property. for each item can you define her own style and you can setup how often this item is rendering to the calendar about the recursive - property of the dateitem.
Hi,
Will be useful to specify at the Article Editor, the technologies involved in the control:
Is it vb or C#? winforms, webforms, wpf? .net 2.0, 3.0, 3.5?
Also a little explanation of each screenshot describing behaviour will be helpful
This is really cool! I have been looking for this, many thanks!
it would be nice if you could add more modes to support the weekly view and daily view, then it also could be a fully functional schedule/planner control.
Last Visit: 31-Dec-99 18:00 Last Update: 19-Mar-24 1:42