PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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 windows of the pattern.
  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 supplied with WINDEV 23.
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. Select "File .. New .. Window", then "Blank".Click among the quick access buttons:
    • Click "Window" in the wheel that is displayed. The wizard for window creation starts.The window for creating a new element is displayed: click "Window" then "Window". The wizard for window creation starts.
    • In the wizard, select "Blank" and validate.
  2. In the description window, enter the following information:
    • The name of the window. This name must necessarily contain the name of the file displayed in the form (some examples: WIN_Form_RADFileA, WIN_For_RADFileA, ...).
    • The title of the window. 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 ("Insert .. Special .. 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.Create a supercontrol in the window: on the "Creation" pane, 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 description window of the supercontrol, specify the name of the supercontrol. This name must necessarily be SC_Form (SC_ is the prefix defined in the programming charter: it is not required if no programming charter 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, cancelation, 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 cancelation button ("Cancel" button for example).
    To simplify the management of the cancelation 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 the 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 required version
  • Version 12
Comments
Click [Add] to post a comment