- Control in a window or page
- Creating a Calendar control
- Describing the Calendar control
- Translating the elements of a Calendar control
- Translating the "Today"/"Preset period" button
- Translating days and months in the Calendar control
- Translate the context menu of the Calendar control
Control in a window or page
The Calendar control is used to permanently display a calendar in a window or page. This calendar can display the current date, or interact with the window or page (e.g., by displaying the schedule corresponding to the selected day).
Creating a Calendar control
To create a Calendar control:
- On the "Creation" tab, in the "Graphic controls" group:
- expand "Time" and select "Calendar".
- click "Calendar".
- Click where the control will be created in the window or page. The control appears in the editor.
To view the characteristics of the control, select "Description" in the context menu.
Describing the Calendar control
The Calendar control can be customized in the editor via the description window.
Here are some features of the Calendar control. You can:
Translating the elements of a Calendar control
Translating the "Today"/"Preset period" button
The "Today" and "Preset period" buttons can be translated in the calendar description window ("Details" tab).
Translating days and months in the Calendar control
To translate the days and months displayed in the Calendar control, you must set the project language options:
- Open the project description: on the "Project" tab, in the "Project" group, click "Description".
- In the "Languages" tab, select the desired language.
- In the linguistic options of the selected language, select "Date" then "Use the following parameters".
- Click "Days and Months" and enter the translations, if necessary. Validate.
- Validate the project description window.
Translate the context menu of the Calendar control
When you select a time period in a Calendar control, a context menu appears. By default, the context menu of the Calendar control is available in English and French.
To translate the context menu of the Calendar control into another language, the IW_WINDEVAafMenu_Date window must be added to your project.
To add the context menu of a Calendar control to your project:
- On the "Project" tab, in the "Project" group, expand "Import" and select "WINDEV elements and their dependencies".
- Select the subdirectory that contains the elements to import. The popup menu of the calendar is located in the "\Programs\Data\Preset windows\AAF" subdirectory of the WINDEV setup directory.
- WINDEV lists the elements of the directory. This directory contains the different elements corresponding to the customizable AAFs. To customize the Calendar control, select "IW_WINDEVAafMenu_Date".
- Validate. The internal window is included in the project.
- The window must not be renamed.
- If this window is included in your application, you may not benefit from the improvements made to this window during the different updates. Don't forget to check whether this window has evolved.
- Caution: To modify this window, the corresponding file must not be read-only. Modify the characteristics of the file in Windows if necessary.
To customize the context menu of the calendar:
- Display the "IW_WinDevAafMenu_Date" window.
- In the "UI" tab, click the button on the right of "Popup menu". Select "Edit this popup menu".
- The popup menu appears in the editor. For example, you can translate the various options into the desired language.
You cannot select a period in Linux. The popup menu of the calendar is not available.
Unit examples (WINDEV): The Calendar control
This page is also available for…
Click [Add] to post a comment