4D v14

ビデオの内容

ホーム

 
4D v14
ビデオの内容

ビデオの内容  


 

 

In this video, well set up forms so that we can have a consistent interface, stored at a single place per form category.

We have already used page 0 in forms in order to centralize elements that are shared on every page of the same form.

Form inheritance consists of creating a form where we place objects that are shared between several forms (texts, buttons, etc.) that will inherit from this "parent" form.

In order, we need to:

  • create a "parent" form
  • place the objects on it
  • and indicate the "relationship" with the "child" forms that will inherit from it.

The parent form can be a project form or a form associated with a table.

Here we're gong to create this new form.

  • In the Explorer choose => "Project Forms"
  • Click on +
  • Call it HERIT_PAGE since we're going to create a form intended to be inherited on different pages.
    A blank form appears.
  • We add a button at the top left.
  • And Save the form.

Now that the parent exists, we can associate child forms with it:

  • Open the input form for interventions
  • and in the Property list of the form
  • we're going to choose "Inherited page" as the Inherited form.

We can see the contents of the parent form immediately appear in the background.

If we modify the location of the button on the parent form and save it (without closing it), we'll see the same modification carried out directly on the child form.
And of course it is also carried out on forms that are closed.

Since the goal is to keep the interface consistent, we're going to move the buttons of the child form to the parent form.

  • Cut
  • Paste
  • and Save

and the buttons appear again automatically in the child form.

Now, to apply this modification to other input forms, you just need to:

  • Open them (Technician => Input)
  • Remove the buttons already included in the form
  • Then set the Inherited Form Name to "HERIT_PAGE"

This means that now any changes made to the parent form, for instance if we move everything just a few pixels and then save it, will be automatically carried out on all the forms that inherit from this parent form.

 
プロパティ 

プロダクト: 4D
テーマ: フォームの継承

 
ARTICLE USAGE

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