4D v14

ビデオの内容

ホーム

 
4D v14
ビデオの内容

ビデオの内容  


 

 

In this video, we're going to learn how to create pages in the navigation form and program buttons to be able to access each of the pages.

We now have an aesthetically correct database.

We can delete two old buttons that are no longer useful.

In the previous video, we added "handling" buttons on page 0 at the top of the form (like Add, Select All, Query, etc.) that will work for each of the work lists. We also added function buttons that can be used to access records in each of the tables.

4D has several tools for navigating within forms, including tabs. In our example, we'll navigate by clicking function buttons on the left of the form.

We need to make the form functional by creating pages 2 through 5 and then positioning specific information on each page and making it possible to navigate between the different pages.

To create pages:

  • We open the "Navigation" project form
  • Then we can choose "Add Page" from the "Form" menu
  • Confirm the dialog
  • And repeat the process until we get 5 pages.

You can also use the right arrow to create additional pages.

To check the page changes, we'll add a different text or drawing on each page, at a different location, so that it's easy to notice each time the page changes.

Let's go back to page 1.

  • Here we're supposed to work on interventions
  • On page 2, on the list of technicians
  • On page 3, on locations
  • On page 4, preferences
  • And on page 5, parameters

Of course, we'll remove all this text later on.

Since the "Technicians" text was replaced, we now need to indicate for each button the right form page to display when the user clicks on it.

  • So let's go back to page 0
  • We'll open the method for the "Interventions" button by right-clicking on it and choosing "Object Method"
  • Then we enter the following:

 FORM GOTO PAGE(1)

We'll copy the text and do the same thing for each button, while changing the page number as needed.

  • page 2 for technicians
  • 3 for locations
  • 4 for preferences
  • and 5 for parameters.

You'll notice that we didn't use a right-click to create methods for each of the last 4 buttons.

Instead, we used the Alt+click shortcut directly on the object. This shortcut automatically creates an object method or opens the existing one.

Now we can test the form and its new navigation by clicking the green triangle at the top left of the form.

By default, page 1 is displayed. We can select another page by programming.

When we click on the other buttons, in principle, we'll change pages.
The form works properly and meets user expectations. Now we need to give them some data, which is covered in the next section.

 
プロパティ 

プロダクト: 4D
テーマ: フォームとナビゲーションページ

 
ARTICLE USAGE

セルフトレーニング ( 4D v13)
セルフトレーニング ( 4D v14)