ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / RAD / RAD pattern
  • 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
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Creating the Vision windows of the WINDEV RAD pattern
The steps for creating a RAD pattern
The steps for creating a WINDEV RAD pattern are as follows:
  1. Creating the "RAD Pattern" project.
  2. Creating the different pattern windows.
  3. Generating the RAD pattern.
  4. Using the RAD pattern.
Create the different pattern windows

The files to create

Reminder: To build a RAD pattern used to create a full project, the following files are required:
  • 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 2024.
These rules are recommendations. You can implement and use your own standard.
The Vision Plus windows

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:
  1. Click in the quick access buttons:
    • The new element window appears: click "Window" then "Window".
    • The window creation wizard starts.
    • In the wizard, select "Blank" and validate.
  2. 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 (for example, "RADFileA: Vision plus").
  3. Save the window.
  4. Create a Table control in the window: on the "Creation" tab, in the "Data" group, expand "Table and List Box" and select "Table (Vertical)".
  5. In the table creation wizard, specify the following characteristics:
    • Select "Display data from a file or existing query".
    • Select the base file of the table (RADFileA for example).
    • Keep the proposed item as well as the search item.
    • Specify the source for the fill operation: "File with direct access".
    • Validate the name of the table.
  6. Position the Table control in the window and define its size.
  7. Create and position the different buttons of your window: OK, Cancel and New.
    Caution: if the user is allowed to apply a skin template to the windows created by RAD, you must define the type of button that must be used in the skin template. This information can be defined in the modifier ("Skin template" category).
  8. 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:
    // Return value
    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.
  9. 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.
  10. 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:
    // Reset the record of RADFileA
    HReset(RADFileA)
    // Open the form of RADFileA
    IF Open(WIN_Form_RADFileA) THEN
    // Refresh the table
    TableDisplay(TABLE_RADFileA, taCurrentFirst)
    END
  11. Window initialization code:
    // Position on the current record
    TableDisplay(TABLE_RADFileA, taCurrentFirst)
    // Default return value
    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:
  1. On the "Creation" tab, in the "Usual controls" group, click "Combo Box". The Combo Box control creation wizard starts.
  2. 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 name of the control is "COMBO_IDRADFileX" (COMBO_ is the prefix defined in the code style: it is not required if no code style is used). For example, for the RADFileB form, the combo box will be named COMBO_IDRADFileA.
  3. Validate. The Combo Box control is created.
To create the button:
  1. On the "Creation" tab, in the "Usual controls" group, click "Button".
  2. In the control description window, specify the name of the button. This control has a name in the following format: "BTN_VISION_RADFileX" (BTN_ is the prefix defined in the code style: it is not required if no code style is used). For example, for the RADFileB form, the button will be named BTN_VISION_RADFileA.
    Caution: if the user is allowed to apply a skin template to the windows created by RAD, you must define the type of button that must be used in the skin template. This information can be defined in the modifier ("Skin template" category).
  3. The click code of the button is as follows:
    // Open the vision window of RADFileA
    IF Open(WIN_Vision_RADFileA) = True THEN
    // Refreshes the content of the RADFileA combo box
    ListDisplay(COMBO_IDRADFileA, taCurrentFirst)
    END
Minimum version required
  • Version 12
Comments
Click [Add] to post a comment

Last update: 08/30/2023

Send a report | Local help