Description

The Px Properties Manager lets you manage the PxProperties of the .px views globally. A PxProperty is a (usually graphical) property with a name and a value that can be reused on several widgets of the same view through the PxEditor tools. This makes it possible, among other things, to standardize the appearance of the views and to manage graphic modifications in a group (same background color, same title font, etc.). PxProperties are basically internal to one .px and must be copied manually from one .px to another. When changing the value, it is necessary to do it for each .px.

The goal of the Px Properties Manager is to be able to change the values of a PxProperty on all .px at the same time. This makes it possible to collectively manage the appearance of the views based on the PxProperties of the .px views. It is thus possible to define a common font and a color for all titles of all .px or to define the same background color of a menu on all .px. The changes to these properties are done once, at the manager level, the values are then propagated in the .px and the views are automatically updated.

Variables can be set within folders to restrict their application to certain .px file folders.

 

The manager is accessible in the BtibService as a view of the PxProperties folder.


Commands

New Folder

This button creates a new folder in the manager. You will then be able to sort your Px Properties according to certain features or groups of .px files.

Px folder path

This command allows the propagation of the Px Properties to be restricted to files in a specific folder (root folder).

  1.  The command is applied to the current folder if no item is selected in the manager
  2. If you select one or more subfolders, then the command is performed on each of those subfolders one after the other.you select one or more subfolders, then the command is performed on each of those subfolders one after the other.
  3. You can nest folders within folders. The Ord selected as the root folder must at least respect the file system tree.

 

By default, the value of the root folder is: the Ord of the parent folder in the manager, or file: ^ if at the root of the manager.

New

Creates a new Px Property

  1.  A first popup appears letting you choose the number of items to add.
  2. A second allows you to choose the types of properties added. Beware that this action is irreversible! (You will have to delete the PxProperty and create a new one if you want to change its type).
  3. The last one allows you to select the name and the value of each of the created properties.

 

 

 

Edit

Modifies a property. This action does not apply to folders

Learn from Px

Allows you to retrieve Px Properties from the station files.

You have two choices:

  1.  Add the missing Properties and leave existing Properties unchanged.
  2. Replace all the manager values and add the missing Properties.

Deploy in the Px

Deploys the manager Px Properties to the station's .px files. This command propagates the Px Properties from the folder and respects the roots defined with the Px folder path.

(lightbulb) If you do not select any items, you will be able to deploy the entire configuration to the files.

(warning) The deployment directly updates the views displayed in a browser (same for the workbench Browser visualization mode). A cache peculiarity requires the workbench to be restarted to see changes in the classic px view of the workbench.

There are three choices available:

  1.  Add only the missing Properties to the files.
  2.  Replace the file Properties with those of the manager.
  3. Add and Replace all Properties in the files.

Delete

Deletes folders of Px Properties or Px Properties directly from the manager.

Two choices are available when deleting:

  1. Delete the properties only in the manager.
  2. Delete the properties in the manager and in the station's files.

If replacement with another value is possible, then a third choice is offered:

  1. Replace with another property from the manager.

    Replaces one property with another. This action directly replaces the properties in the files, moving any existing links to the properties. If link transfers are not allowed then the changes are not applied.

    A popup asks you to choose which other property you want to replace your selection.

     

(warning) You cannot delete a folder unless it is empty.

(lightbulb) A popup asks you to validate your choices

Implementation

The manager allows you to manipulate the Px Properties contained in the .px. It is able to learn all the Px Properties defined in the .px views or to deploy them in the views.

Creation

The creation of a PxProperty in the manager can be done in two different ways:

  1. From the manager
  • Click on "New" from the menu bar at the bottom
  • Choose the number of variables to add to the folder

  • Choose the type of each variable  (  (warning) You cannot change the type later )



  •  You can then define the name of the variable and the corresponding value

                         (tick)  You have just created your first Px variable.

 

      2. From existing Px files

  • In an existing .px, in the right-hand menu titled "PxProperties", click on the "more" icon


  • Set the name of the pxProperty and click OK.

    • In the PxPropertyManager of the btibService, click "Learn from Px" on the bottom menu bar
    • Choose a conflict policy :
      • Ignore the conflicts and keep the oldest value, (if the variable already exists it will not be modified in the manager)
      • Replace with the last value found, (if the variable is found in one or more .px files then the last value found will be used)

        (lightbulb) If you have multiple .px files, the imported value may not match the one found in a particular file. The file scanning order is not guaranteed.

                           (tick) You have just imported your first Px Property from your views.

 

If you followed the first procedure, you should find a screen that looks like this:

 

Deployment

Now we will create a Px file.

  • From the navigation menu on the left, right-click on "Config", and then "New" > "Folder"
  • Name it "Test". Right-click on this "Test" folder and then "Views" > "New View"
  • Name it "header". Refer to the image below for more details
  • In the edit window, note the Px Properties tab on the right (initially empty)

  • Exit the edit and return to the manager and click Deploy to Px
  • Select one of the two options, it does not matter which at present.
    (lightbulb) A banner at the top of the screen indicates whether the deployment was successful.
  • Go back to editing the view and note the appearance of the two previously created PxProperties.

 

Change the variables in the Px or on the manager and play with the Learn and Deploy buttons. Note each synchronization between the manager and the files.