Home Forums WinForms controls Other WinForms controls WinCalendar CurrentDate Reply To: WinCalendar CurrentDate

User (Old forums)
Member
Post count: 23064

Found the way to do this (code below assumes a bool member var exists called “m_bAlwaysShowFocusRect”):

protected override void OnPaintDay(Xceed.Editors.PaintDayEventArgs e)
{
   base.OnPaintDay(e);

   if ((!this.Focused) && m_bAlwaysShowFocusRect)
   {
      if (e.Value == this.CurrentDate)
      {
         System.Windows.Forms.ControlPaint.DrawFocusRectangle(
            e.Graphics, e.ClipRectangle);
      }
   }
}

Imported from legacy forums. Posted by Glenn (had 3053 views)