ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
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
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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: 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.
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:
    • When the new element window appears, click "Window" then "Window".
    • The window creation wizard opens.
    • 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 ("RADFileA: Vision plus" for example).
  3. Save the window.
  4. 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)".
  5. 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.
  6. Position the Table control in the window and define its size.
  7. 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).
  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. Initialization code of the window:
    // 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 opens.
  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 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.
  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 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).
  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_RADFileAID, taCurrentFirst)
    END
Minimum version required
  • Version 12
Comments
Click [Add] to post a comment

Last update: 02/19/2025

Send a report | Local help