Date Time Picker

Hello world form


Compiling

To compile the example:

  1. Launch EiffelStudio.
  2. Click Add project
  3. Browse to $ISE_EIFFEL\examples\dotnet\winforms\control_reference\date_time_picker_ctrl\
  4. Choose date_time_picker_ctrl.ecf
  5. Choose the location where the project will be compiled, by default the same directory containing the configuration file.
  6. Click Open.

Running

After launching the application, you will see a window displayed with a similar appearance to the one above. On the left side of the main window a date is displayed in a COMBO_BOX. Clicking on this COMBO_BOX and a CALENDAR control will appear showing the same date as in the COMBO_BOX. On the right side of the main window are the controls for selecting the format of the displayed date and the style of the CALENDAR control.

Clicking on the "Change font" button and a change font dialog box will appear.

change font dialog box .

Clicking on the "Change color" button and a dialog box will appear. This dialog box will permit you to customize the color appearance of the calendar.

color dialog box .

Under the Hood

This application uses several different controls, but tend to show how to parameter the CALENDAR control using the FONT_DIALOG and COLOR_DIALOG.

When one of the buttons "Change font" or "Change color" is pressed, an event is launched and open the corresponding dialog box.

When the entry in the COMBO_BOX format changes, an event is launched and modify the format of the displayed date.

This sample uses the following classes:

  • CALENDAR
  • COMBO_BOX
  • BUTTON
  • LABEL
  • GROUP_BOX
  • CHECK_BOX

Notes

This sample is translated from the example located in the QuickStart\winforms\samples\controlReference\dateTimePicker sub-directory of the .NET Framework SDK samples directory of Microsoft Visual Studio .NET.