Home » U++ Library support » CalendarCtrl » Little improvement of Caledar & DropDate controls
Re: Little improvement of Caledar & DropDate controls [message #40534 is a reply to message #40125] |
Sat, 10 August 2013 19:43   |
 |
bushman
Messages: 134 Registered: February 2009
|
Experienced Member |
|
|
Totally cool feature, but, why not include it in DateTimeCtrl.cpp right before the day gets drawn, around line 581, so as to enable user to highlight out-of-current-month days too? It would look like:
if(sd == char(view.day))
{
if(sd < 0 && selall)
{
fg = st.outofmonth;
fnt.Bold().Underline(!special);
}
if(sd > 0 && view.month == m)
{
fg = st.selectday;
fnt.Bold().Underline(!special);
}
}
if (!WhenPaintDay.Empty()){ // <== Inserted line
WhenPaintDay(Date(y,m,d),fg,bg); // <== Inserted line
} // <== Inserted line
w.DrawRect(xp, yp, cw, rh, bg);
if(special)
{
DrawFrame(w, xp + 1, yp + 1, cw - 2, rh - 2, Black);
DrawFrame(w, xp, yp, cw, rh, st.bgmain);
}
str = AsString(abs(d));
w.DrawText(xp + (cw - GetTextSize(str, fnt).cx) / 2, yp + yc , str, fnt, fg);
}
thanks!
[Updated on: Sat, 10 August 2013 19:43] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Jul 18 08:01:59 CEST 2025
Total time taken to generate the page: 0.04149 seconds
|