Aller au contenu principal
Version: 20 R5 BETA

Propriétés des formulaires


Schéma de couleurs

La propriété de schéma de couleurs n'est appliquée que sur macOS.

Cette propriété définit la palette de couleurs du formulaire. By default when the property is not set, the value for a color scheme is inherited (the form uses the scheme defined at the application level). Pour le formulaire, cette option peut être remplacée par l'une des deux options suivantes :

  • dark - texte clair sur fond foncé
  • light - texte foncé sur fond clair

Une palette de couleurs définie ne peut pas être remplacée par un CSS.

Grammaire JSON

NomType de donnéesValeurs possibles
colorSchemestring"dark", "light"

CSS

This property allows you to load specific CSS file(s) for the form.

A CSS file defined at the form level will override default style sheet(s). For more information, please refer to Style sheets page.

Grammaire JSON

NomType de donnéesValeurs possibles
cssstring or collectionCSS file path(s) provided as:
  • a string (a file for both platforms)
  • a collection of strings (a list of files for both platform)
  • a collection of {"path":string;"media":"mac" | "win"} objects

  • Pages

    Chaque formulaire est composé d'au moins deux pages :

    • une page 0 (page de fond)
    • une page 1 (page principale)

    For more information, please refer to Form pages.

    Grammaire JSON

    NomType de donnéesValeurs possibles
    pagescollectionCollection de pages (chaque page est un objet, la page 0 est le premier élément)

    Form Name

    This property is the name of the form itself and is used to refer to the form by name using the 4D language. The form name must comply with the rules specified for identifiers in 4D.

    Grammaire JSON

    The form name is defined by the name of the folder that contains the form.4Dform file. See project architecture for more information.


    Form Type

    The form type, i.e. its destination, defines the features that will be available to the form. For example, markers can only be set for list (output) table forms.

    Each table in a database generally has at least two table forms. One for listing records on-screen and the other for displaying one record at a time (used for data entry and modifications):

    • Output form - the output form or list form displays a list of records, with a single line per record. The results of queries are shown in an output form and users can double-click a line to display the input form for that record.

    • Input form - used for data entry. It displays a single record per screen and typically has buttons for saving and canceling modifications to the record and for navigating from record to record (i.e., First Record, Last Record, Previous Record, Next Record).

    Supported types depend on the form category:

    Form TypeJSON grammarDescriptionSupported with
    Formulaire détaillédetailScreenA display form for data entry and modificationProject forms - Table forms
    Detail Form for PrintingdetailPrinterA printed report with one page per record, such as an invoiceProject forms - Table forms
    List FormlistScreenA form for listing records on the screenTable forms
    List Form for PrintinglistPrinterA printed report that list recordsTable forms
    Aucunno destinationA form with no specific featureProject forms - Table forms

    Grammaire JSON

    NomType de donnéesValeurs possibles
    destinationstring"detailScreen", "listScreen", "detailPrinter", "listPrinter"

    Inherited Form Name

    This property designates the form to inherit in the current form.

    To inherit from a table form, set the table in the Inherited Form Table property.

    To remove inheritance, select \<None> in the Property List (or " " in JSON).

    Grammaire JSON

    NomType de donnéesValeurs possibles
    inheritedFormstringName of table or project form OR a POSIX path to a .json file describing the form OR an object describing the form

    Inherited Form Table

    This property specifies the database table from which to inherit a form in the current form.

    Set to \<None> in the Property List (or " " in JSON) to inherited from a project form.

    Grammaire JSON

    NomType de donnéesValeurs possibles
    inheritedFormTablestring or numbertable name or table number

    Publié en tant que sous-formulaire

    For a component form to be selected as a subform in a host application, it must have been explicitly shared. Lorsque cette propriété est sélectionnée, le formulaire sera publié dans le projet hôte.

    Seuls les projets formulaire peuvent être indiqués comme étant des sous-formulaires publiés.

    Grammaire JSON

    NomType de donnéesValeurs possibles
    sharedbooleantrue, false

    Mémoriser géométrie

    When the option is used, if the window is opened using the Open form window command with the * parameter, several form parameters are automatically saved by 4D when the window is closed, regardless of how they were modified during the session:

    • la page courante,
    • la position, la taille et la visibilité de chaque objet du formulaire (y compris la taille et la visibilité des colonnes de list box).

    This option does not take into account objects generated using the OBJECT DUPLICATE command. Pour que l’utilisateur retrouve son environnement lors de l’utilisation de cette commande, le développeur doit répéter la séquence de création, définition et positionnement des objets.

    When this option is selected, the Save Value option is available for certain objects.

    Grammaire JSON

    NomType de donnéesValeurs possibles
    memorizeGeometrybooleantrue, false

    Voir également

    Save Value


    Nom de la fenêtre

    The window title is used when the form is opened using the Open form window and Open window 4D commands in Application environment. Le nom de la fenêtre apparaît dans la barre de titre de la fenêtre.

    You can use dynamic references to set the window titles for forms, i.e.:

    • Une référence XLIFF standard stockée dans le dossier Resources.
    • A table or field label: The syntax to apply is <?[TableNum]FieldNum> or <?[TableName]FieldName>.
    • A variable or a field: The syntax to apply is \<VariableName> or <[TableName]FieldName>. La valeur du champ ou de la variable sera affichée dans le nom de la fenêtre.

    Le nombre de caractères pour un nom de fenêtre est limité à 31.

    Grammaire JSON

    NomType de donnéesValeurs possibles
    windowTitlestringLe nom de la fenêtre sous forme de texte brut ou de référence