https://bugzilla.novell.com/show_bug.cgi?id=424267
Summary: DateTimePicker: Space bar does not toggle checkbox
Product: Mono: Class Libraries
Version: SVN
Platform: x86
OS/Version: Windows Vista
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
To reproduce, run code, press space bar
Observed: checkbox is not cleared
Expected: checkbox must be cleared
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.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs