4D v13.4

List box column specific properties

Home

 
4D v13.4
List box column specific properties

List box column specific properties  


 

 

You can select a list box column in the Form editor by clicking on it when the List Box object is selected:

You can set standard properties (text, background color, etc.) for each column of the List box; these properties take priority over those of the List box object properties.

You also have access to specific properties that are detailed in this section.

  • Expression (selection type list boxes): The Expression lets you specify the 4D expression to be associated with the column:

    You can enter:
    • A 4D expression (simple expression, a formula or a 4D method). The result of the expression will be automatically displayed when you switch to Application mode. The expression will be evaluated for each record of the selection (current or named) of the Master Table. If it is empty, the column will not display any results.
    • A simple variable (in this case, it must be explicitly declared for compilation). You can use any type of variable except for BLOBs and arrays. The value of the variable will be generally calculated in the On Display Detail event.
    • A field using the standard [Table]Field syntax (example: [Employees]LastName). The following types of fields can be used:
      • Alpha
      • Text
      • Numeric
      • Date
      • Time
      • Picture
      • Boolean
      You can use fields from the Master table or from other tables.
      In any case, you can specify the expression using the 4D Formula editor by clicking on the [...] button in the Property List. If an expression is used, the column is never enterable even if the Enterable option is checked.
      If a field or a variable is used, the column can be enterable or not depending on the Enterable option (and the “Can’t Modify” attribute in the Structure editor).
      In Design mode, the data source type is displayed in the first row of the column. For example, Field=[Table1]MyFld.
      If the specified expression is not correct, the column of the list box will display an error message in Application mode.
  • Default values (array type list boxes): click on the Edit... button to display a dialog box where you can enter a list of default values for the column. These values are available automatically in the array variable associated with this column when the form is executed.
    You must enter a list of values separated by carriage returns then validate the dialog box. For more information about this dialog box, refer to Default values in the Data entry controls and assistance section.
  • Data Type (selection type list boxes): This menu is used to define the type of expression or variable associated with the column. It is used to indicate the display format to apply and lets you update the Display Type menu in the “Display” theme.
    If a field is entered in the Expression area, the Data Type property is not displayed; the display format corresponding to the field type is used.
  • Choice List: This property can be used to associate a choice list with a column of the list box. If you designate a list, the user can use his or her values (displayed using a pop-up menu) to modify the values of the column and its associated array:

    Note that keyboard entry is still possible. If you want for values to only be modified using the pop-up selection menu, choose a required list (see below).
    Note: If the specified list is hierarchical, only the items of the first level are taken into account.

This theme groups together the properties related to the list box column width.

  • Width: Default column width (in pixels). This value is updated when you resize the column using the mouse in the Form editor.
    If the Resizable property is checked, the user can also manually resize the column.
  • Minimum Width: The minimum width of the column (in pixels). The width of the column cannot be reduced below this value when resizing the column or form.
  • Maximum Width: The maximum width of the column (in pixels). The width of the column cannot be increased beyond this value when resizing the column or form.

Note: When resizing the form, if the Grow horizontal sizing property was assigned to the list box, the right-most column will be increased beyond its maximum width if necessary.

This theme only contains the Resizable option (checked by default). When this option is checked, the user can resize the column by moving the sides of the header area.

This theme groups together all the properties related to data entry in the list box column.

  • Enterable: Authorizes column entry (checked by default). To change the value of a cell, the user must click twice on the value.
    When this property is disabled, any pop-up menus associated with the column via a list (“Data Source” and “Range of Values” themes) are disabled.
    Note: For more information about the mechanisms implemented for data entry in list boxes, refer to Managing entry in the 4D Language Reference manual.
  • Entry Filter: Associates an entry filter with column cells. This property is not accessible if the Enterable property is not checked.

This theme allows setting lists used to manage list box column entry.

  • Required List: Allows setting a list where only these values can be inserted into the column. The list values are accessible using a pop-up menu associated with each cell (refer to the “Choice list” property in the Data Source theme).
    Unlike the Choice List property, when a required list is defined, keyboard entry is no longer possible, only the selection of a list value using the pop-up menu is allowed. If different lists are defined using the Choice List and Required List properties, the Required List property has priority.
  • Excluded List: Allows setting a list whose values cannot be entered in the column. If an excluded value is entered, it is not accepted and an error message is displayed.

Note: If the specified list is hierarchical, only the items of the first level are taken into account.

This theme is used to specify the display format for column values and the state of the Invisible property. The contents of this theme vary according to the type of variable set in the Objects theme.

Note: When the list box is displayed in hierarchical mode, all the properties of this theme are disabled for the first column.

  • Type Format: Used to associate a display format with the column data. The formats provided will depend on the variable type (array type list box) or the data/field type (selection type list box). The standard 4D formats that can be used are: Alpha, Numeric, Date, Time, Picture and Boolean. The Text type does not have specific display formats. Any existing custom formats are also available.
  • Boolean arrays can be displayed as check boxes or pop-up menus. If you choose the Check Box option, the Title property appears so that you can enter the title of the check box. If you choose the Pop-up option, the Text when True and Text when False properties appear, allowing you to set both titles for the pop-up menu.
  • Columns with numeric values can be displayed as three-states check boxes. This option is found in the Display Type drop-down list. If you choose the Three-states checkbox type, the following values are displayed:
    • 0 = unchecked box,
    • 1 = checked box,
    • 2 (or any value >0) = semi-checked box (third state). For data entry, this state returns the value 2.
    • -1 = invisible check box,
    • -2 = unchecked box, not enterable,
    • -3 = checked box, not enterable,
    • -4 = semi-checked box, not enterable
    In this case as well, the Title property appears so that the title of the check box can be entered.
  • The Invisible property, when checked, allows hiding the column in the Application environment.
    In the Design environment, you can choose to display or hide the invisible columns using the list box context menu (click on a column or column header):

 
PROPERTIES 

Product: 4D
Theme: List boxes