PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • The steps for creating a RAD pattern
  • Creating the different windows of the pattern
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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 windows of the pattern.
  3. Generating the RAD pattern.
  4. Using the RAD pattern.
Creating the different windows of the pattern

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 supplied with WINDEV 23.
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. Select "File .. New .. Window", then "Blank".Click among the quick access buttons:
    • Click "Window" in the wheel that is displayed.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 table (some examples: WIN_Vision_RADFileA, WIN_Vis_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: Vision plus").
  3. Save the window.
  4. Create a Table control in the window ("Insert .. Control .. Table").Create a Table control in the window: on the "Creation" pane, in the "Data" group, expand "Table and list box" and select "Table (Vertical)".
  5. In the wizard for table creation, specify the following characteristics:
    • Select "Display the data found in a file or in an 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. 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. Select "Insert .. Control .. Combo box".On the "Creation" pane, in the "Usual controls" group, click "Combo box". The wizard for creating a Combo Box control starts.
  2. In the wizard for creating the combo box, select the following options:
    • "I want to enter a list of values or fill the combo box by programming".
    • 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 programming charter: it is not required if no programming charter 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. Select "Insert .. Control .. Button".On the "Creation" pane, in the "Usual controls" group, click "Button".
  2. In the description window of the control, specify the name of the button. This control has a name such as "BTN_VISION_RADFileX" (BTN_ is the prefix defined in the programming charter: it is not required if no programming charter 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 required version
  • Version 12
Comments
Click [Add] to post a comment