PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
New WINDEV 27 feature!
  • In this lesson you will learn the following concepts
  • Overview of the example used in this part
  • Creating a window to list products
  • Creating the window
  • Creating controls
  • Window test
  • Creating a "Product form" window
  • Creating the window
  • Creating Edit controls
  • Creating buttons
  • Window UI improvements
  • Opening the form from the list of products
  • Modifying a product
  • Modifying the product image
  • Validating the changes made to the product
  • Testing changes in the product
  • Creating a new product
  • Adding a Button control
  • Adding a new record in the data file
  • Checking if a product has been added
  • Viewing records
Lesson 4.1. Full application: Addition and modification windows
In this lesson you will learn the following concepts
  • Overview of the example project.
  • Creating a menu window to list products.
  • Creating a product form.
  • Adding and modifying products.
Lesson duration

Estimated time: 50 mn
Previous LessonTable of contentsNext Lesson
Overview of the example used in this part
In this part, we will create an application that manipulates data files in HFSQL Classic format.
This order management application will be used to:
  • View, enter and modify products,
  • Print reports,
  • Display statistics,
  • Manage use levels,
  • Send emails,
  • ...
The development of this application will also allow us to see how to deploy and distribute applications to end users.
You will see the main points for developing an application.
In the previous part of this tutorial we saw how to create a project and an analysis. We won't go back to it. We will work with a project that already contains an analysis and data files with data. The application analysis is an improved version of the analysis that was created in the previous part.
We are going to:
  • create different windows to list, add and modify products.
  • create different reports.
  • deploy the application.
  • use functionalities specific to the development of the application (Dashboard, Audits, SCM).
  • integrate functionalities (User Groupware, email management, etc.).
You will discover multiple aspects of the data files and use some useful WINDEV features­.

  • Open the "WD Full Application" project:
    1. Start WINDEV.
    2. Go to the WINDEV home page (Ctrl + <).
    3. On the home page, click "Tutorial", then in "Part 4 - Full application with data", double-click "Full application (Exercise)".

      Answers

      A corrected project is available. This project contains the different windows that will be created in this lesson. To open the corrected project, go to the home page and click "Tutorial", then in "Part 4 - Full application with data", double-click "Full application (Answers)".
Creating a window to list products
To create the window that will be used to list the products, we will create a blank window and then add all the controls: this will allow us to present the steps required to create this type of window.

Creating the window

  • To create a window to list products:
    1. Create a new blank window.
      • Click Create an element in the quick access buttons (or press Ctrl + N).
      • The creation window appears: click "Window" then "Window".
      • In the wizard, click the "Based on a template" tab and choose "Use: WINTPL_Template". Validate.

        Note

        Window templates
        A window template is used to give a standard style to the different application windows.
        A window template contains all graphic elements common to all application windows. A window template can also contain code. In this case, this code will also be common to all application windows.
        For this example, we have created the WINTPL_Template window template. This template contains a logo that will be displayed in all windows:
        Window template
    2. The new window is displayed in the editor. The save window appears.
    3. In this window, specify the window title: "Menu".
      Save an element
    4. The window name (that will be used in the code) is created automatically from the window title. However, you can specify a name different from the window title.
    5. Validate.

Note

The name of this window is "Menu" because it will be the main window of our application. It will be used as a menu and will also display information.

Creating controls

We will use a Table control to create the list of products. This control will be related to the "Product" data file.

Note

What is a Table control?
Do not confuse "Table" and "Table control".
  • We refer to a Table for an SQL database.
  • A Table control is used to display the values of a data source in a GridView. In this case, the data can be entered directly or come from a data file (or table).
The Table control in WINDEV is used to display or modify data:
  • in memory: it is referred to as a memory Table control or Table control filled through programming.
  • coming from data files or queries: it is referred to as a browsing Table control.
  • coming from WLanguage variables: it is referred to as a Table control on source.
  • To create the Table control:
    1. On the "Creation" tab, in the "Data" group, expand "Table and List Box" and select "Table (Vertical)". The control will follow the mouse cursor.
    2. Click inside the window: the Table control creation wizard starts.
    3. The Table control that is we are creating will display the records from the "Product" data file. In the wizard, select "Display data from a file or existing query".
      Table control creation wizard
      Go to the next step of the wizard ("Next").
    4. The next step of the wizard shows the different data files and queries in the current project. Expand "Analysis" if necessary and select the "Product" data file.
      Select data file
      Go to the next step.
    5. The wizard shows the list of items in the "Product" data file.
      By default, all items are checked in order to be displayed in the Table control. In our case, we will display all items EXCEPT the "ProductID" identifier that corresponds to the automatic identifier of the data file.
      Uncheck "ProductID".
      Table control creation wizard
      Go to the next step.
    6. Then, the wizard proposes to select the sort item. This item will be used to sort the data displayed in the Table control. The items proposed in the wizard correspond to the items defined as key items in the analysis. The products will be sorted according to their caption. Click on the "Caption" row.
      Table control creation wizard
      Go to the next step.
    7. The following steps are additional settings. Keep the default options in the following steps and finish the wizard.
    8. The Table control is automatically created in the window. The control is automatically positioned and resized to fit all available space in the window.
      Window with the Table control in the editor
Let's take a look at the control we have just created: the data is already displayed in the control, even in the editor. This concept is called "Live data": the content of the data files on the development computer is used in the windows or reports handled in the editor. This feature is very useful to define the size of the controls in a window for example.

Window test

  • We will test the window we have just created.
    1. Click Test window in the quick access buttons.
    2. The window is automatically displayed with its data at runtime.
    3. You can navigate through the products with the scrollbar (or with the arrow keys).
  • Let's imagine that we are the end user to see how the Table control works at runtime.
    Test of the window that contains the Table control
Remarks:
  • The Table control has the same aspect at runtime and in the editor: this is the WYSIWYG concept ("What You See Is What You Get").
  • Small icons appear at the top of the columns:
    • the double arrow indicates that the column can be sorted ("Reference" or "Caption" column for example).
      Double arrow indicating that the column can be sorted
      Click the "Caption" column twice for example: the data is displayed according to a different order. An arrow on the left of the column indicates that it is sorted and shows the sort direction.
    • the magnifier indicates that a search can be performed in the column.
      Magnifier in a column of a Table control
      Click the magnifier of the "Reference" column for example. An input area allows you to type the search reference. Type "REF-010". The product corresponding to this reference is automatically displayed.
      Search in a column
  • A context menu is available for the Table control and its columns. This context menu appears:
    • by right-clicking the column of the Table control.
    • by clicking the arrow in the upper-right corner of the column headers.
  • This context menu is used to export the content of the Table control to Excel (or OpenOffice.org Calc), Word (or OpenOffice.org Writer), to print, etc, ...
    Control context menu
In just a few minutes, we have seen some features that are automatically included in the Table control. You don't need to write code to make these features available to your users. These features are called "AAF" (Automatic Application Features).

Note

Multiple controls include AAFs by default. If these features should not be available (for security or privacy reasons), they can be disabled in the editor or in the code.
Now that the list of products is displayed, you may want to modify a product. To do so, we are going to create a window used to display the product details.
  • Close the test window using the "X" at the upper-right corner of the screen. The WINDEV editor is redisplayed.
Creating a "Product form" window

Creating the window

We will create a window to display the characteristics of the product selected in the Table control. This type of window is called "Form" because it is a descriptive form of the desired element.
  • To create a window to display the product details:
    1. Open the "WD Full Application" project if necessary.
    2. Create a new blank window.
      • Click Create an element in the quick access buttons.
      • The creation window appears: click "Window" then "Window".
      • The window creation wizard starts.
      • In the "Based on a template" tab, choose "Use: WINTPL_Template" and validate the wizard.
    3. The save window is displayed. Type the window title: "Product form". The name ("WIN_Product_form") is automatically filled.
    4. Validate the save window.

Creating Edit controls

The "Form" window will display the data from the different items in the "Product" data file.

  • To create the controls in the window:
    1. Open the "Analysis" pane if necessary: on the "Home" tab, in the "Environment" group, expand "Panes", select "Panes", and then select "Analysis". The different data files described in the "WD Full Application" analysis appear in the pane.
    2. Click Arrow to the left of the "Product" data file: the items in the data file appear.
      Analysis pane
    3. With the mouse, select all items displayed in the pane (except for the "ProductID" item). You can select multiple elements by holding the Ctrl key down.
    4. Drag these items and drop them onto the window you have just created.
      Drag and drop items
    5. Different controls are automatically created in the window. These controls are bound to the corresponding item in the data file. To check this:
      • Select the "Reference" control for example.
      • Right-click to open the context menu and select "Description".
      • Go to the "Binding" tab in the description window:
        Edit control description
        This tab shows that the current Edit control is bound to the "Reference" item in the "Product" data file.
    6. Close the description window.
    7. Save the window.
  • Move the controls and resize the window to get the following UI:
    Window interface in the editor

Creating buttons

We will add and modify products from the list in the "WIN_Product_form" window.
To do so, we are going to add validation and cancellation buttons.
  • To create the Button control to validate the data entered:
    1. On the "Creation" tab, in the "Usual controls" group, expand "Button" (click the arrow under Button control ).
    2. The list of preset buttons is displayed.
    3. Click "OK": the Button control shape appears under the mouse pointer.
    4. Click to the right of the Edit controls to create the Button control.
  • Add the Button control to cancel the input following the same steps.
    1. On the "Creation" tab, in the "Usual controls" group, expand "Button" (click the arrow under Button control ).
    2. In the list of preset buttons, click "Cancel": the Button control shape appears under the mouse pointer.
    3. Then click below the "OK" Button control to create the control.
      Interface in the editor

Window UI improvements

This window is quite simple, let's improve its UI. Several details can become very annoying for the user so let's try to sort them out right now.
Aligning controls
  • First, we will align the controls and make them the same size:
    1. Select the "Caption" control and then all the Edit controls in the window (hold the Ctrl key down and click on each control, for example). The first selected control will be used as reference to set the size of the other controls.
    2. In the ribbon, go to the "Alignment" tab. This tab contains all alignment options available for the controls.
      Alignment tab
    3. We will align the outside and inside borders of the controls. Click "Justify (Ins. and Out.)".

      Note

      If you don't know which alignment to choose, hover over the different options available in the "Alignment" tab. When you hover the mouse over an option, the controls selected in the window are automatically positioned and/or resized according to the hovered option.
      To apply the alignment, click the desired option.
      If you don't want to apply the alignment, simply exit the alignment options: the controls move back to their initial position.
      Window size
Resizing the window
Once we have positioned all the controls in the window, we can define its final size. In our example, the window is still too big.
  • We can use the sizing handles, as we have done previously. However, WINDEV also offers the possibility to directly enter the window dimensions.
    1. Click on the window in the editor. The window is selected.
    2. In the message bar, enter the new window size.
      Interface in the editor
      In this example, the initial dimension is set to 609 x 270, we will enter 554 x 252.
    3. The window is automatically modified. To undo the changes and select another size, press Ctrl +Z.
Managing anchors
  • Let's see the visual aspect of our window:
    1. On the "Modification" tab, in the "Preview" group, click "Preview". This runtime mode is used to display the window interface. The different codes are not run.
    2. Enlarge the window via the sizing handles at the bottom of the window. The position of the controls does not change, so there is a large empty area in the window. Two methods can be used to solve this problem:
      • Prevent the window from being resized.
      • Define the anchors, i.e., the behavior of the controls when the window is resized. That's what we are going to do.
        Window preview
    3. Close the preview: click the "Close" button or the "X" icon at the upper-right corner of the window.

      Note

      How to set anchors in a window?
      To set the anchors:
      1. In the editor, reduce the window to its minimum size. All outside window borders should be close to a control.
      2. Analyse the controls and consider : "How will the controls react when the window is enlarged?". Then, apply the corresponding anchor.
  • For this window, we are going to define the anchors together:
    1. The "OK" and "Cancel" Button control must be anchored to the right.
      • Select these two controls.
      • Right-click to open the context menu and select "Anchor".
      • In the anchor options window, select "Right".
        Anchors
      • Validate.
      • Small red arrows appear in the editor, indicating that the controls are anchored to the right.
    2. The edit controls must be enlarged horizontally:
      • Select the 4 edit controls.
      • Right-click to open the context menu and select "Anchor".
      • In the anchor options window, select "Width" ( Horizontal anchors ).
      • Validate.
    3. We will test the behavior of this window in the preview:
      • On the "Modification" tab, in the "Preview" group, click "Preview".
      • Enlarge the window: the controls adapt to the horizontal enlargement.
      • We will now define the vertical anchors of the controls.
    4. The "Description" control can contain a larger or smaller product description. It is the largest control in the window: it must fill all the available space. Set a horizontal and vertical anchor ( Width and height anchors ).
    5. A red line appears automatically around the "Price BT" control: the window editor indicates an anchoring problem. If the "Description" control stretches down, the "Price BT" control must also move down.
    6. Open the anchoring window of the "Price BT" control. The best anchoring option is automatically proposed: "Width and bottom" (a green checkmark is displayed). Select the proposed anchor and validate.
    7. We will test the behavior of this window in the preview:
      • On the "Modification" tab, in the "Preview" group, click "Preview".
      • Enlarge the window: the controls adapt to the vertical and horizontal enlargement.
        Window preview
    8. Close the window preview to go back to the editor.

Opening the form from the list of products

Now, let's see how to open the form of the product selected in the list of products. The principle is very simple: the user will select the product in the Table control and display the product details via a Button control.
  • We are going to modify the "WIN_Menu" window to create a Button control:
    1. Go to the "Menu" window: click "WIN_Menu" in the open document tabs:
      Open document tabs
    2. Currently, the Table control occupies the entire window. Expand the window to the right with the sizing handles.
    3. Reduce the size of the Table control:
      • Hold the Shift key down.
      • Reduce the Table control via its sizing handles.

        Note

        The Shift key allows you to ignore the anchoring options when resizing the controls.
    4. We now have space on the right to create the Button control that will allow us to view the selected product in the Table control.
  • To create the Button control to view the product:
    1. On the "Creation" tab, in the "Usual controls" group, expand "Button" (click the arrow under New Button control ).
    2. Enter "Modify" in the search box at the top of the list of preset Button controls. Click "Modify button". The shape of the control appears under the mouse pointer. Then, click on the right of the Table control to create the Button control.
      Window with the Button control in the editor
    3. Right-click the control that was just created. Select "Code" in the menu that appears.
    4. In the code window that appears, write the following WLanguage code in the "Click" event:
      WIN_Product_form.Open()

      Note

      The assisted code input (also called "completion") is going to help you: when you enter a dot after the window name, a drop-down list with the functions that can be used in the window will appear. Simply select the function you want with the keyboard or mouse.
    5. Let's take a look at this WLanguage code: <Window>.Open is used to open the "WIN_Product_form" window. This function was already presented in the first part of this tutorial.
    6. Save changes by clicking Save element in the quick access buttons.
    7. Close the code window (click the "X" icon in the upper-right corner of the code editor).
We are now going to modify the "WIN_Product_form" window to display the selected product in the Table control.
  • Open the "WIN_Product_form" window: click the corresponding tab in the open document tabs.
  • To display the product data:
    1. Open the events associated with the window:
      • Right-click outside the window.
      • Select "Code" in the context menu that appears.
      • The code editor appears. The WLanguage events associated with the window are displayed.
    2. Enter the following WLanguage code in the "End of initialization of WIN_Product_form" event:
      // Assigns the content of items to the controls
      FileToScreen()

      FileToScreen displays the data from the data file in the controls, for the current record. In our case, the current record will be the record selected in the Table control of "WIN_Menu" window.
    3. Close the code window.
    4. Save the window (Ctrl + S).
  • Open the "WIN_Menu" window in the editor: click the corresponding tab in the open document tabs.
  • Test the window (click Test window in the quick access buttons).
    • In the list of products, click one of the products.
    • Click the "Modify" button.
    • The detailed product window is displayed.
  • Close the different test windows using the "X" at the upper-right corner of the windows.
Modifying a product
We will now modify the "WIN_Product_form" window to modify a product.
We are going to:
  • allow the user to modify the product image.
  • add Button controls to save or cancel changes made in the product form.

Modifying the product image

The user will be able to modify the product image in the Product form. To do so, we are going to create a "Modify" Button control below the product image. This control will open a file picker to select the desired image.

  • First, open the "WIN_Product_form" window: click the corresponding tab in the open document tabs.
  • To create the Button control to modify the image:
    1. On the "Creation" tab, in the "Usual controls" group, expand "Button". Enter "Modify" in the search box at the top of the list of preset Button controls. Click "Modify button".
    2. The shape of the control appears under the mouse pointer. Click inside the window, below the product image.
    3. If necessary, resize the Button control (using the handles) so that it has the same width as the Image control.

      Note

      When resizing the control, an automatic magnetism effect simplifies the alignment of the Button control with the Image control.
      Interface of the form window in the editor
    4. Right-click on the Button control. Select "Code" in the menu that appears.
    5. In the code window that appears, write the following WLanguage code in the "Click" event:
      fImageSelect(
      Function wizard in the code editor
    6. The code editor proposes a code wizard.
      • Click "fImageSelect wizard".
      • The code wizard starts.

        Note

        WINDEV includes multiple code wizards that will generate the corresponding lines of code via simple questions. Don't hesitate to use them, you will avoid syntax errors.
    7. Keep all the default options in the wizard and validate. The corresponding WLanguage code is automatically entered.
      File is string
       
      // Opens the image picker
      File = fImageSelect("", "", "Select an image...")
    8. Add the following WLanguage code:
      // If a file was selected
      IF File <> "" THEN
      // Assigns the image to the Image control
      IMG_Visual = File
      END
      This WLanguage code is used to assign the selected file to the Image control in the window.
    9. Close the code editor (click the "X" icon in the upper-right corner of the code editor).
We will test this feature once all the changes in the product form are made.

Validating the changes made to the product

Two Buttons controls have been created in the "WIN_Product_form" window:
  • an "OK" Button control to validate changes,
  • a "Cancel" Button control to return to the product list.
We will now write the WLanguage code of these two controls.

  • First, open the "WIN_Product_form" window: click the corresponding tab in the open document tabs.
  • We will now write the WLanguage code associated with the "OK" Button control.
    1. Right-click the Button control and select "Code" in the context menu.
    2. Write the following code in the "Click" WLanguage event:
      ScreenToFile()
      Product.Modify()
      Close()

      Let's take a look at this WLanguage code:
      • ScreenToFile updates the items of the current record with the data from the bound controls. This function is equivalent to the following lines of code:
        Product.Reference = EDT_Reference
        Product.Caption = EDT_Caption
        Product.Description = EDT_Description
        ...

        Our window contains less than 10 controls and we have already seen the simplicity of WLanguage; the more controls are used, the more you will benefit from the power of WLanguage: a single line of code assigns all the values!
      • <Data file>.Modify is used to update the file data for the current record.
    3. Save changes by clicking Save element in the quick access buttons.
    4. Close the code window (click the "X" icon in the upper-right corner of the code editor).
  • The modifications performed in the "WIN_Product_form" window must be taken into account in the Table control used to list the products. To do this, we will simply modify the WLanguage code associated with the "Modify" Button control in "WIN_Menu".
    1. Open the "WIN_Menu" window in the editor: click the corresponding tab in the open document tabs.
    2. Select the "Modify" Button control and open the code editor (F2).
    3. Modify the "Click" event as follows:
      // Opens the product form for the selected product
      WIN_Product_form.Open()
       
      // Updates the selected row
      TABLE_Product.Display(taCurrentSelection)
      Let's analyze this code:
      • <Table>.Display is used to update the Table control with the data modified in the product form.
      • The taCurrentSelection constant is used to specify that the Table control must be updated from the position of the selection bar.
    4. Save changes by clicking Save element in the quick access buttons.
    5. Close the code window (click the "X" icon in the upper-right corner of the code editor).

Testing changes in the product

  • To test the changes of a product:
    1. Test the project (click Test project in the quick access buttons).
      Quick access buttons
    2. WINDEV asks you to select the first project window. In our case, this window corresponds to "WIN_Menu". Select this window and validate.

      Note

      The first window of the project is the first window that will be opened when the application is launched. The first window of the project can be defined:
      • during the project test,
      • when creating the executable,
      • in the "Project explorer" pane: select the desired window, open the context menu and select "First project window".
      When the first window of the project is defined, a small red 1 appears to the left of the the window name in the "Project explorer" pane.
    3. The project starts in test mode and the first window is displayed.
    4. Select a product from the product list (for example the first one) and click "Modify".
    5. The details of the selected product are displayed in the form window.
    6. Change the price from 100.23 Dollars to 200.00 Dollars and click "OK".
    7. When you go back to the list of products, you will notice that the price of the product has been updated.
    8. Open the product details again.
    9. Click the "Modify" button below the image. The image picker is displayed. Select an image and validate. The image is displayed in the form.
    10. Click the "Cancel" button. The image modification was ignored in the data file.
    11. Click the "X" to close the application.
Creating a new product
The principle for creating a product is as follows:
  • In the product list window, we will add a "New" Button control that will open the "Product form" window.
  • Then, we will modify the code of the "Product form" window to add a product to the Product data file.

Adding a Button control

  • To add a "New" Button control to "WIN_Menu":
    1. Open the "WIN_Menu" window in the editor: click the corresponding tab in the open document tabs.
    2. On the "Creation" tab, in the "Usual controls" group, expand "Button" and select "New button".
    3. The shape of the control appears under the mouse pointer. Click inside the window: the Button control is created.
    4. Place the Button control above the "Modify" button (if necessary, move the "Modify" button).
      Window interface in the editor
    5. Modify the WLanguage code of this control:
      • Right-click the "New" button and select "Code" in the context menu.
      • Write the following code in the "Click" WLanguage event:
        Product.Reset()
        WIN_Product_form.Open()
        TABLE_Product.Display(taCurrentRecord)
        Let's analyze this code:
        • Reset resets the item variables in the "Product" data file to the default values to handle the new record.
        • Open is used to open the product form to enter the new record.
        • Display is used to re-display the Table control. In this code, the taCurrentRecord constant re-displays the Table control from the position of the current record.
    6. Save changes by clicking Save an element in the quick access buttons.
    7. Close the code window (click the "X" icon in the upper-right corner of the code editor).

Adding a new record in the data file

  • We will now modify the product form window to add a new record.
    1. Open the "WIN_Product_form" window.
    2. We will make changes in the WLanguage code of the "OK" button:
      • Right-click "OK" and select "Code" in the context menu.
      • In the "Click" event, replace the existing WLanguage code with the following:
        ScreenToFile()
        IF Product..NewRecord THEN
        Product.Add()
        ELSE
        Product.Modify()
        END
        Close()
        Let's take a look at this WLanguage code:
        • The NewRecord property indicates whether the current record should be created.
        • If <Data file>.Reset has been called previously, the property returns True (when "New" is clicked) and the record is created with Add.
        • If the current record already exists, it is modified by <Data file>.Modify.
        • <Data file>.Add adds the record to the data file. This function takes the values in memory and writes the contents of the file items to the data file itself. The indexes are immediately and automatically updated. In this case, the "Product" data file is updated.

          Note

          The test code of the new record can be replaced with <Data file>.Save. This function checks whether the record is already in the data file, and allows you to add it or modify it if necessary. The code becomes:
          ScreenToFile()
          Product.Save()
          Close()
    3. Save changes by clicking Save an element in the quick access buttons.
    4. Close the code window (click the "X" icon in the upper-right corner of the code editor).

Checking if a product has been added

  • To check if a product has been added:
    1. Test the project (click Test project in the quick access buttons).
    2. In the list of products, click the "New" button.
    3. Enter a new product with the following characteristics:
      • Reference: REF-337
      • Caption: Surf WD
      • Description: Surf with WINDEV colors
      • Price: 150
        Test of the window for adding a product
    4. Validate. The new product is displayed in the list of products.
    5. Click the "New" button again.
    6. Enter a new product with the following characteristics:
      • Reference: REF-337
      • Caption: Surf WB
      • Description: Surf with WEBDEV colors
      • Price: 150
    7. Validate. A specific window is displayed:
      Management of duplicates
      This window lets the user know that a duplicate has been found: the reference (which is a unique key) is the same for two products. This window allows you to change the reference value: type "REF-338" for example.
      This window handles HFSQL errors automatically.

Note

Several errors may occur when adding or modifying a record: duplicate errors, integrity errors, password errors, etc.
WINDEV provides multiple modes to handle these errors:
  • the automatic mode: for each error encountered when handling database records, a specific page is displayed to the user. This window allows users to modify their data directly.
  • the advanced programming mode: a custom error handling procedure or window is called for each error encountered when managing the database records.
The "WD Detecting HFSQL Errors" example, provided with WINDEV, allows you to check these different error handling modes. This example can be opened via the WINDEV home page (Ctrl + <), "Open an example" option.

Viewing records

The new added records can be immediately viewed in the Table control of the "WIN_Menu" window.
However, in some cases (when running tests for example), you may want to see the content of the data file directly.
WINDEV offers a simple tool to view the contents of the data files while the application is being developed (e.g. when the windows that will display data have not yet been created).
This tool is WDMAP. We will use it to view the contents of the Product data file.
  • To start WDMAP:
    1. On the "Tools" tab, in the "Database" group, click "WDMap".
    2. Select the "Product" data file. The data file content is displayed.
      WDMAP
    3. Sort the elements by reference (click the header of the "Reference" column), the two added records appear.
Previous LessonTable of contentsNext Lesson
Minimum version required
  • Version 27
Comments
Click [Add] to post a comment