Edit Fields and Controls Window

Home Development System Windows Edit Fields and Controls Window

With the Edit Fields and Controls window you can view and change information about fields and controls, the third level of the four-level hierarchy of MoStacks. You find more about them in general in the chapter Fields and Controls.

The window uses the Edit Modes system to handle the possibly many fields of the currently selected background, a Modify button to save changes, a New button to create a new field/control etc.

The following two frames allow you to use any field or control of the stack:

Backgrounds: This list shows all backgrounds of the stack. Selecting/single-clicking an entry switches the list Fields of Background to all fields (and controls) of the corresponding background. (There is no way to get a total list of fields across all backgrounds, the list is always per-background.)

Double-clicking an entry opens the Edit Backgrounds window.

Fields of Background: This is the list of all fields and controls of the current background, the one currently selected in the Backgrounds list.

The window has the following frames with controls and fields to display and/or change various aspects of the current field, or to specify a new field:

Basic info: Collection of "basic" info, applicable to every or nearly every field/control regardless of type. In detail:

Type: The most fundamental parameter of the field or control, its type. You find a list and explanations in the chapter Field and Control Types.

Name: The name, the human-readable identification, unique within the current background. You find details about names in MoStacks in the chapter Names.

Label: The label, displayed to the left of the field in the Card View. Note that the longest label of any visible field in a background decides the starting positions of the fields (i.e. the position of the left borders) in the Card View, so it's a good idea to keep labels short, but still informative. The rightmost starting position that MoStacks will allow is the middle of the Card View; labels longer than half the width of the view will not be fully visible.

Visible height: The visible height of the control, in lines. Giving e.g. 3 for a Text field results in a field that is high enough to show 3 full lines of text. This takes the font into account; a larger font gives 3 higher lines and thus a higher field. If the value of the field has more than 3 lines, there will be a vertical scroll bar.

Specifying a height directly in pixels is not possible. Some field types are fixed to 1 line, e.g. date fields, time fields, checkboxes and combo boxes. Albeit this is a little strange and in need of improvement, you also specify the height of a picture field in lines (lines in the font configured for the field, which is otherwise completely irrelevant); best to use the flag Automatically maximize visible height? with picture boxes to circumvent this.

Fields are always displayed with the visible height as specified, even if this causes the field to be only partially visible or fully invisible "below" the lower edge of the Card View.

Visible width: The width of the field, in characters, where the width of a character is the average width of characters of the font that is used for the field. (Because most fonts are proportional, there is of course no guarantee to always have the specified number of characters visible.)

The right border of the Card View limits the length of the field. As there is no flag (yet) like Maximize visible width?, just specify a high number of characters as the visible width if you want to make sure that the field uses the whole available width.

Specifying a width directly in pixels is not possible. For commands visible as buttons you can leave this field empty; the button will then automatically get the correct width to display the whole label.

The visible width has nothing to do with the number of characters that the field value is allowed to have. A text field with a visible width of e.g. only 2 can still hold a string with 100 characters, you just won't see much of it.

Albeit this is a little strange and in need of improvement, you also specify the width of a picture field in characters (characters of the font of the field, which is otherwise completely irrelevant); best to use a high number of characters to make the field use the complete view width.

General flags: These are flags usable for all or for most of field and background types. They are described in their own chapter Field and Control Flags.

The tab page Textual contains fields and controls to configure all textual types. Beside the check boxes for the flags (described in their own chapter Field and Control Flags) those are:

Column title: When using the flag Visible in card list as a column?, specify the title of the column for the fields. Default is the label text, but you can easily configure something different, especially something shorter for short fields that will have narrow columns in card lists.

Content length limit: Maximum number of characters allowed in the field value at any times. E.g. if you specify 3 here for a text field, the text field will refuse the string Four as a value, because it has one character too much. Do not confuse with the Visible length parameter.

Note that this feature is not yet implemented on Windows and only partially on Symbian.

Column width in list: Width of the column in a list displaying the value of the field, in characters (converted to pixels by using the average character width of the font used for displaying the list). Default is the visible width.

Decimal places: For fields of type Float, specify a fixed number of digits used when formatting values (thus making them non-floating, as far as display is concerned). The last shown digit will be rounded with the help of the first digit that is not shown anymore (if any). This is mostly useful for fields that show amounts; e.g. use a value of 2 for currency fields (2 decimal places to show cents).

The tab page List contains fields and controls to configure List fields. Beside the check boxes for the flags (described in their own chapter Field and Control Flags) those are:

Input field for the combo: The partner field for the list, the combo box field holding the currently selected value.

Note that switching this field is not implemented in the current release.

List colums: For a card list, configures the colums of the list, with the help of a comma-separated list of field names from the background to list. The easiest way to build this field name list is using the Select Fields window (with multiple selection). However, by using that window, you cannot specify the order of the columns yourself. For doing so you have to write the list "manually". That way, you can even refer to a field more than once, e.g. show it in a column at the start and again at the end of the list lines.

Background of cards to list: For a card list, the background of the cards to list. See more about card lists and how to specify them, with examples, in chapter Card Lists.

Field to check for selecting value: For a card list that shows a selected subset of cards from a certain background, the field on that background that must contain a certain value in order for the card to get selected. See more about card lists and how to specify them, with examples, in chapter Card Lists.

Field giving selecting value: For a card list that shows a selected subset of cards from a certain background, the field that holds the selecting value, the value that the cards must have in their field to check in order to get selected. This is a field of the same background as the list field. See more about card lists and how to specify them, with examples, in chapter Card Lists.

Default value: When a new card is created, fields with a default value set here will be set to that value automatically instead of being left empty (for text fields) or getting a pre-determined type-dependent default value, like 0 for numerical fields.

For list fields that are not card lists, specifying a default value is currently the only interactive way to get a value for the field at all. For a list, you typically give a default value with several lines - when writing it, use the Enter key to end a line and start a new one.

After a card is created, default values for its field don't play any further role, i.e. they won't be applied a second time: Setting a field to empty does not let the default value return.

Font: Specify the font for the field or control, the fourth-level font in the four-level hierarchy. No font from higher up in the hierarchy is able to "overrule" a font set here. But, on the other hand, as soon as you start to work with field-specific fonts, you won't be able anymore to easily switch the font for everything in the stack in one go. The button leads to the Select Font window. Read about fonts on UIQ3 in general in the chapter UIQ3 Fonts.

Color: The color selected at the field level will become the color of the text, i.e. the foreground color. (Colors at the stack, background and card level are all background colors.) Note that there is no way (yet) to specify the color of the background of the field, e.g. to specify a text field with red text on blue ground. (The color of the card only starts at the border of the field.)

The button opens the standard Windows color selection dialog.

Insert position: Influence the position of a field/control within all the fields and controls of the background. If you select a field, the position will be immediately before that field. If you select the special list entry At the end, the position will be at the end, after the field that is now the last.

A new field will be created at the position given. But you can also move an existing field, by selecting a value for the otherwise empty Insert position field and saving with the help of the Modify button.

The window has the following buttons:

New: Switch the mode to "create", as a preparation to create a new field or control, and set the focus to the Type combo box, to give the type for the new object.

New Text: Switch the mode to "create" and immediately set the type to Text, to make the frequent case of creating a new text field fast and easy.

New Integer: Switch the mode to "create" and immediately set the type to Integer, to make the frequent case of creating a new integer field fast and easy.

New Command: Switch the mode to "create" and immediately set the type to Command, to make the frequent case of creating a new command control fast and easy.

Help: Display this help page.

Script: Open the Edit Script window to edit field/control scripts. Given the state of implemenation of MoStacks' script engine, control scripts will be the most frequent by far, implementing the on select message (see chapters Commands and Scripting: Messages).

Delete: After confirmation, delete the current field/control. It will vanish from all cards that exists for that background, and the corresponding values will be deleted as well (even if those values are pictures, elaborate lists or whole wiki texts - things you might not want to loose, hence the confirmation.)

Create: Create a new field/control, based on the info that you specified.

Modify: Save the modifications. Just changing anything in this window but not clicking the Modify button has no effect; to discard changes, just close the window and re-open it.