ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / RAD / RAD pattern
  • The steps for creating a RAD pattern
  • Creating the different pattern windows
  • The files to create
  • Difference between Mobile and Smartphone
  • Standard to follow
  • The Mobile Vision Plus windows
  • Overview
  • Creating the Vision Plus window
  • Creating the necessary elements in the form window
  • The Smartphone Vision Plus windows
  • Overview
  • Creating the Vision Plus window
  • Creating the necessary elements in the Smartphone 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 Mobile RAD pattern
The steps for creating a RAD pattern
The steps for creating a WINDEV Mobile 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.
Creating 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.

Difference between Mobile and Smartphone

Creating an application for Mobile and an application for Smartphone are two different things. On a Smartphone, the screen is smaller and a drop-down menu allows you to validate (or not) the screens.
This difference also applies to the RAD patterns. This help page explains how to create a form window for Mobile and for Smartphone.

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 Mobile 16.
These rules are recommendations. You can implement and use your own standard.
The Mobile 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 element creation window appears: click "Window" then "Window".
    • The window creation wizard starts.
    • In the wizard, select "Blank" and validate. In the wizard, keep the default options.
  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: Validate 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 Validate button.
    This button will be used to validate the selection in the table. The code of the button is as follows:
    // Return value
    MyWindow..ReturnedValue = True
    // Close the window
    Close()
  9. 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, taCurrentRecord)
    END
  10. Initialization code of window:
    // Position on the current record
    TableDisplay(TABLE_RADFileA, taCurrentRecord)
    // 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".
  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 the relation key (IDRADFileARel for the combo box found in the RADFileB form for example.
    • 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, taCurrentRecord)
    END
The Smartphone 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.
  • menu options used to validate the choice in the table, create a new element and close the window.
To create a Vision Plus window:
  1. Click in the quick access buttons:
    • The element creation window appears: click "Window" then "Window".
    • The window creation wizard starts.
    • In the wizard, select "Blank" and validate. In the wizard, keep the default options.
  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. Modify the menu found in the window:
    • An option must be used to validate the choice in the table.
    • An option must be used to create a new element.
    • An option must be used to close the window.
  8. These menu options must have specific names:
  9. Case of the validation option.
    This option will be used to validate the selection in the table. The code of the option is as follows:
    // Return value
    MyWindow..ReturnedValue = True
    // Close the window
    Close()
  10. Case of New option.
    This option is used to create a new record by opening the corresponding Form window. The code of the New option 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 window:
    // Position on the current record
    TableDisplay(TABLE_RADFileA, taCurrentFirst)
    // Default return value
    MyWindow..ReturnedValue = False

Creating the necessary elements in the Smartphone 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".
  2. In the combo box creation wizard, select the following options:
    • "Display data from a file or existing query".
    • data source: RADFileA for the combo box found in the RADFileB form.
    • the combo box is linked to the relation key (IDRADFileARel for the combo box found in the RADFileB form for example.
    • 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.
  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: 09/07/2021

Send a report | Local help