DateTimeInput, DevComponents.
Namespace: DevComponents.Editors.DateTimeAdv
Assembly: DevComponents.DotNetBar2.dll
Using: DevComponents.Editors.DateTimeAdv;
Declaring: DevComponents.Editors.DateTimeAdv.DateTimeInput();
Creating the DateTimeInput.
DevComponents.Editors.DateTimeAdv.DateTimeInput datetime = new DevComponents.Editors.DateTimeAdv.DateTimeInput();
datetime.Location = new Point(100, 100);
datetime.Size = new Size(200, 23);
datetime.ButtonDropDown.Visible = true;
datetime.Text = DateTime.Now.ToString();
this.Controls.Add(datetime);
Creating a DateChanged event for the control.
datetime.MonthCalendar.DateChanged += new EventHandler(MonthCalendar_DateChanged);
Responding to the DateChanged event.
void MonthCalendar_DateChanged(object sender, EventArgs e)
{
DevComponents.Editors.DateTimeAdv.MonthCalendarItem dd = (DevComponents.Editors.DateTimeAdv.MonthCalendarItem)sender;
MessageBox.Show(dd.SelectedDate.ToString());
}
Screenshots - DateTimeInput, DevComponents.
|
|