ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / RAD / RAD pattern
  • The steps for creating a RAD pattern
  • Which windows must be created?
  • The files to create
  • Standard to follow
  • The Form windows
  • Overview
  • Creating a Form window
  • Case of print buttons
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 Form windows of a 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.
Which windows must be created?

The files to create

Reminder: To build a RAD pattern used to create a full project, the following files are required:
  • A Form window for RADFileA.
  • A Form window for RADFileB. A Combo Box control and a Vision Plus button (or a popup combo box) must allow you to select an element found in the RADFileA file.
  • A Form window for RADFileC. A Combo Box control and a Vision Plus button (or a popup combo box) must allow you to select an element found in the RADFileB file.
  • A Table window for RADFileA.
  • A Table window for RADFileB.
  • A Table window 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 Form windows

Overview

A Form window includes the following elements:
  • A supercontrol: This supercontrol contains the controls of the form to display. This supercontrol is linked to the file to display.
  • Buttons used to perform the main actions: Validate, Cancel and Print if necessary.
  • Link buttons used to display the corresponding tables windows for example (only for the forms concerning RADFileA and RADFileB).
  • Vision Plus buttons used to select the elements of another file in a specific window (only for the forms concerning RADFileB and RADFileC).
Example of Form window for the Simple RAD Pattern:

Creating a Form window

To create a Form 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 form (some examples: WIN_Form_RADFileA, WIN_For_RADFileA, ...).
    • The window title. If the title must display the name of the file, use the name of the "RADFileXX" file (for example, "RADFileA: Input form").
  3. Save the window.
  4. Create a supercontrol in the window: on the "Creation" tab, in the "Containers" group, click "Supercontrol".
    This supercontrol will display the controls found in the form. Position this control in the window and define its size. Scrollbars will be automatically displayed if some of the controls cannot fit in the specified size.
  5. In the supercontrol description window, specify the name of the supercontrol. This name must necessarily be SC_Form (SC_ is the prefix defined in the code style: it is not required if no code style is used).
  6. In the "Content" tab of the supercontrol description, specify:
    • the file browsed: RADFileXX ("RADFileA" for example).
    • the item browsed: IDRADFileXX ("IDRADFileA" for example).
  7. Create and position the different buttons of your window (validation, cancellation, print and browse buttons, ...). These buttons can have any name.
    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 validation button ("OK" or "Validate" button for example).
    To simply the management of the validation button, you have the ability to use a preset action. We recommend that you use the "Close the window and return a value" action, with "Returned value: the value specified in the code by ..ReturnedValue".
    In the code of the validation button, we advise you to enable the automatic management of errors ("If Error: ", with the automatic process "Display the error and go back to edit").
    The code of the validation button can be (for a form on RADFileA):
    // Read the information entered
    ScreenToFile()
    // If it's a new record
    IF RADFileA..NewRecord = True THEN
    // Add it
    HAdd(RADFileA)
    ELSE
    // Modify it
    HModify(RADFileA)
    END
    // Return value of the window
    MyWindow.ReturnedValue = True
  9. Case of cancellation button ("Cancel" button for example).
    To simplify the management of cancellation button, you have the ability to use a preset action. We recommend that you use the "Close the window and return a value" action, with "Returned value: the value specified in the code by ..ReturnedValue".
  10. Enter the initialization code of the window. Example:

    // Display the records
    FileToScreen()
    // Return value returned by default
    MyWindow.ReturnedValue = False

    This code is used to display the value of the records in the form and to return a value.
  11. Add the link buttons if necessary.
  12. Add the Vision Plus buttons if necessary (for the RADFileB and RADFileC forms).

Case of print buttons

A RAD pattern can contain buttons used to start a print. The code of these buttons (or the associated preset option) must allow you to start the printing (or the preview) of the report.
The reports must be created in the project of the RAD pattern:
  • The name of these reports must contain RADFileX. For better readability, we recommend that you use "Form" or "Table" in the name of the form to easily identify the type of the report.
  • This name must be used in the code of print button (or in the preset action associated with the button).
CAUTION: There is no need to customize the reports found in your project of the RAD pattern. Indeed, during the generation, only the name of the report will be kept. If the "Print" button is found in a "Form" window, the printed report will be a Form report. If the "Print" button is found in a "Table" window, the printed report will be a Table report.
Minimum version required
  • Version 12
Comments
Click [Add] to post a comment

Last update: 08/30/2023

Send a report | Local help