List Box

List box serves as a user input object. Its role is to let the user select a predefined option from a list.

Tip

Unlike Combo box, List Box does not allow inserting custom values.

Source

Connected data source is the dynamic data source that is connected with the object.

  • Variables: variables which are used as List box object content source, or variables which store the selected value in List box object.

  • Databases: database which stores the values selected in List box object.

Tip

This is a read-only form object. Connected data source only defines its content.

Settings

Settings tab defines object content editing specifics and displaying of values.

Allow duplicates allows duplicated values appear on the dropdown list.

Is sorted sorts the list of elements in ascending order. Use case sensitive sort additionally determines if the letter case should affect the sorting order or not.

Values group of settings defines which elements are going to be listed in the List box object:

  • Items source: defines the source for listed items.

    • Custom values: static user-defined values.

    • Installed printers: list of installed printers.

    • Database field: retrieved values from a connected database.

      • Field: selection of connected database field to retrieve the content from.

      • Use another field for connected data source option: connects another database field to the connected data source. The Values content list still displays the Field values, but the connected data source receives the selected value from a field in Value field.

        Example 63. Example:

        Field: ObjectField1

        Value field: ObjectField2

        Connected data source: Variable1

        Result:

        Object connected to Variable1 displays the content from ObjectField1 and sends the content from ObjectField2 to the Variable1.

      • Value field: selects the database field that is sent to the object's Connected data source and displayed as its content.

    • File names: lists all files in the selected directory.

      • Directory: defines the source folder for files to be listed.

      • File mask: specifies the filter for selecting the listed files.

        Example:

        *.* lists all files

        *.nlbl lists only files with .nlbl extension.

        t*.nlbl lists files that start with "t" and have the extension .nlbl.

      • Show the file path: entire file path is displayed on the list of files.

      • Show the file extension: file extension is displayed on the list of files.

    • Font names: lists the installed fonts.

    • Labels in solutions: lists all labels within the solution.

    • Edit: converts other item sources into a custom values item source.

    • Values content list: displays the current object content.

    • Set as default: turns the currently active selection into a default value.

      Tip

      Default value is a value that is automatically selected when the form is run.

Note

All values except for custom values are populated when the form is run. The values displayed at design time are sample values retrieved from the current computer.

Style

Style tab defines visual appearance of an object.

Background color defines the object background color.

  • Transparent: transparent object background.

Font color defines the font and underline colors.

Font selects the typeface.

The font may appear Bold, Italic, Underlined or as a Strikethrough text.

Position

Position tab defines object positioning and its position-related behavior.

Position group defines the object position.

  • X and Y: anchoring point coordinates.

  • Width and Height: horizontal and vertical object dimension.

  • Keep aspect ratio: simultaneous changing of object dimensions while scaling.

  • Lock: prevents the object from being moved during the design process.

Size group sets how object's dimensions change when the form is running:

  • Resize anchor point: defines the fixed distance of an object from the form borders.

    Tip

    Choose the most appropriate anchor point to ensure the object's visibility regardless of the current window size.

  • Horizontally resize with form and Vertically resize with form: object size automatically adapts to the changing size of the form.

    • Horizontally resize with form: object width adapts to the resized form.

    • Vertically resize with form: object height adapts to the resized form.

      Note

      If both options are enabled, object width and height adapt to the resized form simultaneously.

Rotation angle group sets the object angle according to the design surface.

Events

Events tab defines the actions that are run by various object-related events.

Tip

See section Actions Editor to read more about this powerful Desktop Designer tool.

Available events are:

  • On Focus: action is run when focus is set on the object.

  • On Exit: action is run when focus moves to another object.

  • On Click: action is run on mouse click.

General

General tab identifies the object and defines object settings for form startup.

Name sets a unique object ID. It is used for object referencing when defining functions, variables, scripts, etc.

Description allows adding notes and annotations for an object.

Hint helps the form users by briefly explaining why or how to use the selected object.

Initial state on form setup group defines the object behavior while editing and printing a form:

  • Enabled: defines if the object is going to be active (editable) at form startup or not.

    • Condition: an object is enabled if the result of the given condition is "True".

  • Visible: defines if the selected object is going to appear on the form or not.

    • Condition: an object is visible if the result of the given condition is "True".

Content after a print action group defines how the object content is handled after each printout.

  • Reset content after print: object content reset after printing.

    • Clear content: object emptied after printing.

    • Reset to initial content: content reset after printing to the initially defined object content.