[Mono-bugs] [Bug 424269] New: DateTimePicker: focus not visible

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Sep 8 06:04:49 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=424269


           Summary: DateTimePicker: focus not visible
           Product: Mono: Class Libraries
           Version: SVN
          Platform: x86
        OS/Version: Windows Vista
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: kobruleht2 at hot.ee
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


To reproduce, run code

Observed:

There is is visual indication that DataTimePicker control is active

Expected:

There most be some visual indicator showing that DateTimePicker is active.

Code:

using System;
using System.Windows.Forms;

class Test
{
    static void Main()
    {
        Application.Run(new ReportDialogForm());
    }
}

class ReportDialogForm : Form
{

    public ReportDialogForm()
    {
        Controls.Add(new MyDateTimePicker());
        var tb = new TextBox();
        tb.Top = 30;
        Controls.Add(tb);
    }

    class MyDateTimePicker : DateTimePicker
    {
        public MyDateTimePicker()
            : base()
        {
            MinDate = new DateTime(1900, 1, 1);
            MaxDate = DateTime.Today;
            Format = DateTimePickerFormat.Short;
            ShowCheckBox = true;
        }

        public new DateTime? Value
        {
            get
            {
                if (!this.Checked)
                    return null;
                return base.Value;
            }

            set
            {
                if (value != null)
                {
                    base.Value = (DateTime)value;
                    Checked = true;
                }
                else
                {
                    base.Value = DateTime.Today.AddDays(1);
                    base.Value = DateTime.Today;
                    Checked = false;
                }
                base.OnValueChanged(EventArgs.Empty);
            }
        }
    }
}


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list