|
|
|
|
|
- The steps for creating a RAD pattern
- Create the different pattern windows
- The files to create
- Standard to follow
- The Vision Plus windows
- Overview
- Creating the Vision Plus window
- Creating the necessary elements in the form window
Creating the Vision windows of the WINDEV RAD pattern
The steps for creating a RAD pattern Create the different pattern windows The files to create Reminder: The following files are required to implement a RAD pattern used to create a full project: - A form for RADFileA.
- A form for RADFileB. A Vision Plus button (or a popup combo box) must allow you to select an element of RADFileA.
- A form for RADFileC. A Vision Plus button (or a popup combo box) must allow you to select an element of RADFileB.
- A table for RADFileA.
- A table for RADFileB.
- A table for RADFileC.
- A relation window RADFileB/RADFileD.
These different elements must contain link buttons. You also have the ability to provide the main menu of the application. Standard to follow This help page presents the different rules that must be applied when creating the pages and windows of the RAD pattern. These rules have been used to create the different patterns provided with WINDEV 2025. These rules are recommendations. You can implement and use your own standard. Overview The Vision Plus windows are used to: - select an element of RADFileA from a form on RADFileB.
- select an element of RADFileB from a form on RADFileC.
Example: Selecting a customer from an order. The following elements allow you to use a Vision Plus window: - in the form window: a combo box and a button.
- a Vision Plus window.
Creating the Vision Plus window The Vision Plus window is a window containing: - a table.
- buttons used to select and handle the elements in the table.
To create a Vision Plus window: - Click
in the quick access buttons: - When the new element window appears, click "Window" then "Window".
- The window creation wizard opens.
- In the wizard, select "Blank" and validate.
- In the description window, enter the following information:
- The window name. This name must necessarily contain the name of the file displayed in the table (some examples: WIN_Vision_RADFileA, WIN_Vis_RADFileA, ...).
- The window title. If the title must display the name of the file, use the name of the "RADFileXX" file ("RADFileA: Vision plus" for example).
- Save the window.
- Create a Table control in the window: under the "Creation" pane, in the "Data" group, pull down "Table and List Box" and select "Table (Vertical)".
- In the table creation wizard, specify the following characteristics:
- Select "Display data from a data file or existing query".
- Select the base file of the table (RADFileA for example).
- Keep the proposed item as well as the search item.
- Indicate the source for filling: "File with direct access".
- Validate the name of the table.
- Position the Table control in the window and define its size.
- Create and position your window's buttons: OK, Cancel and New.
Caution: if you allow the user to apply a skin template to the windows created by RAD, you must define the type of button that must be used by the skin template. This information can be defined in the modifier ("Skin template" category). - Case of the OK button.
This button will be used to validate the selection in the table. The code of the OK button is as follows:
MyWindow..ReturnedValue = True
This button is associated with the preset action "Close the window and return a value", the value being specified in the code by ReturnedValue. - Case of Cancel button
This button is used to cancel the selection. This button is associated with the preset action "Close the window and return a value", the value being specified in the code by ReturnedValue. - Case of New button
This button is used to create a new record by opening the corresponding form window. The code of the New button can be:
HReset(RADFileA)
IF Open(WIN_Form_RADFileA) THEN
TableDisplay(TABLE_RADFileA, taCurrentFirst)
END
- Initialization code of the window:
TableDisplay(TABLE_RADFileA, taCurrentFirst)
MyWindow.ReturnedValue = False
Creating the necessary elements in the form window The Vision Plus windows can be used from the following windows: - Form on RADFileB
- Form on RADFileC
- Relation window with form on RADFileB
A combo box and a button must be created in these windows. These elements can be stacked over the supercontrol corresponding to the form. To create the combo box: - On the "Creation" tab, in the "Usual controls" group, click "Combo Box". The Combo Box control creation wizard opens.
- In the combo box creation wizard, select the following options:
- "I want to enter a list of values or populate the combo box programmatically".
- the combo box is linked to no item
- the expanded control is a list
- the field name is "COMBO_IDRADFileX" (COMBO_ is the prefix of the programming charter: it is not necessary if you don't use a programming charter). For example, for the RADFileB form, the combo box will be named COMBO_RADFileAID.
- Validate. The Combo Box control is created.
To create the button: - On the "Creation" tab, in the "Usual controls" group, click "Button".
- In the control description window, specify the name of the button. This field has a name of the form "BTN_VISION_RADFichierX" (BTN_ is the programming guidelines prefix: it is not necessary if you are not using programming guidelines). For example, for the RADFileB form, the button will be named BTN_VISION_RADFileA.
Caution: if you allow the user to apply a skin template to the windows created by RAD, you must define the type of button that must be used by the skin template. This information can be defined in the modifier ("Skin template" category). - The click code of the button is as follows:
IF Open(WIN_Vision_RADFileA) = True THEN
ListDisplay(COMBO_RADFileAID, taCurrentFirst)
END
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|