MUIbase Support This Project
programmable relational database
with graphical user interface
This page is also available in Deutsch Français

Documentation

Below documentation is part of the MUIbase dictribution and is also available in PDF.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

15. Structure Editor

MUIbase has two different operating modes, the record-editing mode, where you enter and browse records, and the structure-editing mode where you define the structure, that is, the tables, attributes and appearance of a project. This chapter describes the structure editor and explains how to manage the structure of a project.

To switch from record-editing to structure-editing mode select menu item `Structure editor' in the `Project' menu. This closes all windows and opens the structure editor window. To switch back to record-editing mode select menu item `Project - Exit structure editor' or simply close the structure editor by clicking on the close button in the window title bar.

The structure editor window is divided into three parts: in the upper left part there is a field `Tables' for managing the tables of the project, the lower left part is occupied by a field `Attributes' for managing the attributes of a table, and the right part is used by a field `Display' for managing the project's GUI elements.


15.1 Table Management

In the `Tables' field of the structure editor you can create, change, delete and sort tables.


15.1.1 Creating Tables

To create a new table press the `New' button in the `Tables' field. This will open the `New table' dialog containing

  • a string field for entering the name of the table. Each table must have a unique name that starts with an uppercase letter followed by further letters, digits or underscore characters. Non-ASCII characters like German umlauts are not allowed. Please note that in the user interface for the table it is still possible to display any strings including strings with non-ASCII characters.
  • a field `Number of records' where you specify how many records the table is going to hold. `Unlimited' means that the table can hold any number of records, `Exactly one' means that the table can have only one record. The latter one is sometimes useful for controlling the project (see Tables).
  • a field `Trigger functions' where you can enter the names of two functions. In the `New' string field you enter the name of the function that should be called whenever the user wants to create a new record, the `Delete' string field holds the name of the function that should be called whenever the user wants to delete a record. You can use the pop-up buttons to the right of the string fields for choosing a function name from a list of all names. If you leave a field empty then default actions are executed (records are created automatically and records are deleted after an optional confirmation dialog). For more information on how to use these trigger functions, including the arguments that are passed to them, see New trigger and Delete trigger.
  • a check-mark field `Count changes' that, if selected, makes any creation or deletion of a record count as a change to the project. If not selected then any change in the table (or in any of the table's attributes) is ignored.
  • a check-mark field `Log changes'. If selected, any creation or deletion of a record is recorded in the project log. Otherwise, no change in the table (or in any of the table's attributes) is ever logged.
  • two buttons `Ok' and `Cancel' for leaving the dialog.

When you are done with all settings, press the `Ok' button to create the new table. If you made an error somewhere, e.g. you entered an invalid name, a message window pops up giving you more information about the error you did. If everything goes fine, the `New table' dialog will be closed and the new table is displayed in the structure editor's table list.


15.1.2 Changing Tables

After you have created a new table you can still change it. Just double-click on the table's name and the `Change table' dialog pops up. This dialog is similar to the one when creating a table (see Creating tables) and allows you to make changes in any field by entering a new value.

When you are done with all changes, press the `Ok' button to leave the dialog.

Please note that you can't change the number of records from `Unlimited' to `Exactly one' if the table already contains more than one record.


15.1.3 Deleting Tables

To delete a table, click on the table's name in the structure editor's table list, then press the `Del' button below the list. Before the table is actually deleted a dialog pops up asking for confirmation. If you confirm this dialog by pressing the `Delete' button, the table is deleted.

A problem occurs if the table is used somewhere in the project's program. In this case the table can't simply be deleted but all references to the table must be removed from the program. If the table you want to delete is used in the project's program then the program editor pops up and displays the first occurrence to the table. You should now modify the program such that no references to this table remain in the program. After you removed a reference you can jump to the next one by pressing the `Compile' button. At any point you can still cancel the whole operation by pressing the `Revert' button and closing the program editor.


15.1.4 Sorting Tables

For sorting the tables in the `Tables' field of the structure editor you have several choices. You can order them manually, that is, you use drag & drop to rearrange a table, or you use the `Sort' button below the list-view which orders the tables alphabetically (`Sort1'), or according to the order in the list display (`Sort2').


15.2 Attribute Management

In the `Attributes' field of the structure editor you can create, copy, change, delete and sort the attributes of the active table in the `Tables' field.


15.2.1 Creating Attributes

To create a new attribute for the active table press the `New' button in the `Attribute' field. This will open the `New attribute' dialog containing

  • a string field for entering the name of the attribute. Each attribute in a table must have an unique name that starts with an uppercase letter followed by further letters, digits or underscore characters. Non-ASCII characters like German umlauts are not allowed. Please note that in the user interface it is still possible to display any strings including strings with non-ASCII characters for the attribute.
  • a choice field `Type' where you specify the type of the attribute. For more information on attribute types, see Attribute types.
  • a section below the `Type' field for specifying type specific settings. For more information about this section, see Type specific settings.
  • a field `Trigger' where you can enter the name of a function that should be called whenever the user wants to change the contents of the attribute field in a record. You can use the pop-up button to the right of the string field for choosing a name from a list of all function names. If you leave the field empty then a default action is executed, that is, the entered value is simply stored in the attribute field. For more information on how to use the trigger function, including the arguments that are passed to it, see Attribute trigger.
  • a field `Count changes'. If checked, every change to the attribute in a record counts as a change of the project. Uncheck this item, if you want to ignore changes to an attribute. Note that this item is only enabled when also the `Count changes' item in the table has been set (see Creating tables).
  • a field `Log changes', that, if checked, logs any change made to the attribute in a record. Note that this item is only enabled when also the `Log changes' item in the table has been set (see Creating tables).
  • two buttons `Ok' and `Cancel' for leaving the dialog.

When you are done with all settings, press the `Ok' button to create the new attribute. If you made an error somewhere, e.g. you entered an invalid name, a message window pops up giving you more information about the error you did. If everything goes fine, the `New attribute' dialog will be closed and the new attribute is displayed in the structure editor's attribute list.


15.2.2 Type Specific Settings

In the type specific section the following settings can be specified:

  • For attributes of type string you have

    • an integer field `Max length' for entering the maximum string length for this attribute field.
    • a string field `Initial value' for specifying the value that is used for initializing the attribute field. Any string up to the specified maximum length can be entered here.

  • For attributes of type integer, real, date, and time the type specific section offers

    • a field `Initial value' where you specify the value for initializing the attribute field. You can choose between `NIL' and `other'. If you select `other' then you should enter the initial value into the string field on the right.
    • a string field `NIL string' where you enter the string that should be displayed when the attribute field holds the NIL value.

  • For Boolean attributes the type specific section contains a field `Initial value' where you can choose between `NIL' and `TRUE' for the initial value.

  • The type specific section for choice attributes offers

    • a button `Edit labels' for opening the `Edit labels' window where you can enter the label strings for the choice field (see Label editor).
    • a choice field `Initial value' for specifying the value for initializing the attribute field.

  • For reference attributes the type specific section contains

    • a list-view displaying all tables for specifying to which table the reference should be made. Click on the table the attribute is going to reference.
    • a field `Auto show'. If checked, the referenced table gets updated automatically with the referenced record whenever the user switches to another record.
    • a field `Filter'. If checked, the reference filter of this attribute is turned on. See Reference filter, for more information about this feature.

    Reference attributes always have the NIL value as initial value.

  • The type specific section for virtual attributes contains a string field `Compute' where you enter the name of a function that should be called for calculating the value of the attribute. You can use the attached pop-up button for selecting a name from a list of all function names. For more information on how to use this function, see Programming virtual attributes.

  • Memo and button attributes do not have any type specific settings. The initial value for memo attributes is an empty string.


15.2.3 Label Editor

Whenever you have to define a list of labels, e.g. the list of labels for a choice attribute, the label editor comes into place. The label editor is a window containing:

  • a list-view displaying the current list of labels. You can click on a label to make it the active one. The active label is also displayed in the string field below the list-view. You can use drag & drop to rearrange the labels.
  • a string field `Label' that displays the active label and allows changing it. The changes do only have effect after you pressed the Enter key. If there is currently no active label then pressing Enter inserts new labels into the list.
  • a button `New' that deactivates the current label which allows entering new labels into the `Label' string field.
  • a button `Remove' that removes the active label from the list.
  • a button `Sort' for ordering the list of labels alphabetically.
  • two buttons `Ok' and `Cancel' for leaving the label editor.

After you entered all labels or made changes to them, press the `Ok' button to leave the window.


15.2.4 Copying Attributes

In case you need a lot of similar attributes, it is possible to copy an attribute. Just select the desired attribute and press the `Copy' button below the attribute list. This opens the `Copy attribute' dialog where the settings of the selected attribute are displayed. Change some of the fields, e.g. the name, and then press `Ok' for creating a copy of the attribute.


15.2.5 Changing Attributes

After you have created a new attribute it is still possible to change some settings of it. Just double-click on the attribute's name and the `Change attribute' dialog pops up. This dialog is similar to the one when creating an attribute (see Creating attributes) and allows you to make changes in some fields. The fields that cannot be changed, e.g. the attribute type, are displayed ghosted.

The following notes should be taken into account when changing an attribute.

  • The type of an attribute cannot be changed. If you ever want to change the type of an attribute, it is best to create a new one of the desired type and copy the record contents from the old attribute to the new one by entering a simple MUIbase program in the query editor (see Query editor).
  • If you change the initial value of an attribute then only new records will get the new value for initializing the record.
  • For choice attributes you should be careful when changing its labels. The labels are only used for displaying the choice field contents, internally, numbers are stored that are used as an index into the list of labels. Thus, if you change the order of labels, you actually don't change the internal number but the label which is displayed for it! Therefore you should not change the order of labels after you created a choice attribute. Appending new labels to the end of the label list, however, doesn't make any problems. For a more flexible way of having a choice-like field where you can also change the order of labels, use a string attribute together with the `List-view pop-up' feature (see Attribute object editor).
  • The referenced table of a reference attribute cannot be changed.

When you are done with all changes, press the `Ok' button to leave the dialog.


15.2.6 Deleting Attributes

To delete an attribute, click on it's name in the structure editor's attribute list and press the `Del' button below the list. Before the attribute is actually deleted a dialog pops up asking for confirmation. If you confirm this dialog by pressing the `Delete' button, the attribute is deleted.

A problem occurs if the attribute is used somewhere in the project's program. In this case the attribute can't simply be deleted but all references to it must be removed from the program. If the attribute you want to delete is used in the project's program then the program editor pops up and displays the first occurrence to this attribute. You should now modify the program such that no references to this attribute remain in the program. After you removed a reference you can jump to the next one by pressing the `Compile' button. At any point you can still cancel the whole operation by pressing the `Revert' button and closing the program editor.


15.2.7 Sorting Attributes

For sorting the attributes in the `Attributes' field of the structure editor you have several choices. You can order them manually, that is, you use drag & drop to rearrange an attribute, or you use the `Sort' button below the list-view which orders the attributes alphabetically (`Sort1') or according to the order in the list display (`Sort2').


15.3 Display Management

In the `Display' field of the structure editor you specify how the database elements should be arranged in the user interface. The field consists of a choice field, a list-view and several buttons.


15.3.1 Display Field

The display field contains the following items:

  • a choice item with two settings, `Table mask' and `Main window'. In `Table mask' you specify how the attributes of the active table are arranged in the user interface. In `Main window' you specify how the tables are arranged.
  • a list-view that displays the current specification of the user interface. The list is organized as a tree. Items that have an arrow to its left are composite GUI objects and can be opened and closed by (double-) clicking on the arrow symbol. A double-click on the item itself opens a window for editing its settings. All GUI objects that have the same parent object are layed out in the same way (either vertically or horizontally). How the layout is done is determined by the parent GUI object: tables and windows layout their elements vertically, groups layout their elements according to the settings in the group editor (see Group editor).
  • a button `+' (`Add') for adding the active table or the active attribute (depending on the state of the display choice field) to the display list-view. Usually tables and attributes are added to the display list-view automatically when you create them.
  • a button `-' (`Rem') for removing the active item from the display list-view. If you remove a table then the whole table form is removed from the user interface, thus you can't see the table in the project's GUI. This way you can hide entire tables. If you remove an attribute from the display list-view then the attribute doesn't appear in the project's GUI. This is useful for hiding attributes.
  • two buttons `Up' and `Down' for moving the active item one field up, respectively down, in the display list-view.
  • two buttons `In' and `Out' for moving the active item one hierarchical level down or up in the display list-view.
  • a button `Text' for adding a text object to the display list-view (see Text editor).
  • a button `Image' for adding an image object (see Image editor).
  • a button `Space' for putting space between the other objects (see Space editor).
  • a button `Balance' for adding a balance object to the display list-view. The balance object is useful for controlling the size of the other GUI objects.
  • a button `Group' for adding a group object to the display list-view. Before you press the `Group' button you can multi-select the items in the list-view that should be moved into the new group. See Group editor, for more information about setting up a group object.
  • a button `Register' for adding a register group to the display list-view. As for group objects, you can multi-select the GUI objects that should be moved into the new register group. For more information about setting up a register group see Register group editor.
  • a button `Window' for adding a new window to the display list-view. As before, you can multi-select the GUI objects that should be moved into the new window. For more information about setting up a window, see Window editor.

For more information about the GUI elements, including their usage, see User interface.


15.3.2 Table Object Editor

When adding a table a default display object is created. To change the settings of the table object, double click the table in the `Display' list and the `Display table'' window appears. The window has three sections that are separated into the tabs `General', `Panel' and `Record'.

The `General' section contains the following items:

  • a numerical field `Weight' for specifying the weight of the object. The value of this field determines how much space, relative to the other objects, the table gets in the final window layout.
  • a field `Background' with a check-mark field `Default' for specifying how the background of the table should look like. If you check the `Default' field then a default background is used, otherwise you can click on the `Background' field to open a window for specifying a custom background.
  • a check-mark field `Has panel' that specifies whether a panel should be displayed at the top of the table. Uncheck this field for hiding the panel. For more information about panels, see Panels.

The `Panel' section is only enabled if the `Has panel' field has been checked. It contains the following items:

  • a string field `Title' for entering a title that should be displayed in the panel header.
  • a string field `Font' with a pop-up button for selecting a font for the title. If you leave the field empty, a default font is used.
  • a field `Background' with a check-mark field `Default' for specifying the background of the panel header. If you check the `Default' field then a default background is chosen. Otherwise you can click on the `Background' button to open a window for specifying a custom background.
  • a field `Num/All'. If checked the number of the current record and the number of all records are displayed in the right part of the panel header.
  • a field `Filter' that, if checked, adds a filter button to the panel header. With the filter button you can turn on and off the record filter of the table. If you don't check this field then the menu item `Table - Change filter' will also be disabled for this table, thus you can't enter a filter expression for the table. For more information about record filters, see Record filter.
  • a field `Arrows' for adding two arrow buttons to the table mask. The arrow buttons allows you to browse through the records of the table. If you don't check this field then you can't browse the records of this table and all sub menu items of menu item `Goto record' and the menu items `Search for', `Search forward', and `Search backward' in menu `Table' are disabled.

The `Record' section allows to specify a record description. The record description is used when creating log entries and in list popups for selecting a record. It should be a short but unique identification. The section contains the following items:

  • a choice field `Description' that can be set to either `Fields' or `Computed'.
  • if `Description' is set to `Fields' then a list of attributes of the table are shown. You can choose any of the items for the record description. If you select `Record number' than the record number of a record is included in the display. Multiple items can be selected and you can rearrange the order of items by drag and drop.
  • if `Description' is set to `Computed' then a field `Compute' is shown for entering a function that computes the record description. The function can either return a single expression or a list of expressions (see Compute record description).
  • a check-mark field `Use multi-column list' for specifying a preference of how to arrange the list items when presented in a list-view.

Below the tab-separated sections there are two buttons `Ok' and `Cancel' for leaving the window. After you are done with all settings, click on the `Ok' button to close the window.


15.3.3 Attribute Object Editor

When you add an attribute to the display list-view, a default GUI object is created for it. To change the settings of the attribute object, a double click on it opens the `Display attribute' window. This window contains several items depending on the type of the attribute. The following items are included for most attribute types:

  • a string field `Title' for entering a title that is displayed near the attribute object (or, for buttons, inside the object). If you leave this field empty then no title is displayed.
  • a choice field `Position' for specifying where the title (if any) is placed relative to the attribute object. You can choose between `Left', `Right', `Top', and `Bottom'.
  • a string field `Shortcut' for entering a letter than can be used together with the Alt key (Windows, Mac OS and Linux) or the Amiga key to activate the object.
  • a field `Home'. If checked, this attribute object becomes the home object. The home object is used as the object where the cursor is set on whenever a new record is allocated. This is quite useful if you always want to start entering data into the same attribute whenever you create a new record. If you mark an attribute object as the home object then all other attribute objects in the same table loose this property.
  • a field `Tab chain'. If checked the object is part of the focus chain that can be cycled through by pressing the Tab key. Uncheck this item if you want to skip over the element.
  • a field `Read only' that, if checked, gives the object a read only status. This means that you can only read its contents but can't edit them. Note however, that if you add a pop-up button to the object, the contents can still be changed by the selections offered in the pop-up.
  • a choice field `Alignment' for specifying how the attribute contents should be presented in the object. You can choose between `Center', `Left' and `Right' for displaying the contents centered, flushed left, or flushed right.
  • an area `Enabled/disabled'. If `Always enabled' is selected then the object is always enabled independent of the record shown. `Disabled in initial' disables the object in the initial record but enables it otherwise. If `Compute enabled' is chosen then a function for computing the enabled state of the object can be entered to the right. The function does not take any arguments. If it returns NIL then the object is disabled, otherwise enabled. In case the compute function is left empty or cannot be found, the object gets disabled. For more information on how to use this trigger function, see Compute enabled function.
  • a numerical field `Weight' for specifying the weight of the object. The value of this field determines how much space, relatively to the other objects, the object gets in the final window layout. For most attribute types this field only affects the horizontal size of the object as most objects have a fixed height. For a Memo attribute, for example, it also affects the vertical size.
  • a field `Font' for selecting the font used for displaying the attribute contents. If you leave the field empty, a default font is used.
  • a field `Background' with a check-mark field `Default' for specifying how the background of the attribute should look like. If you check the `Default' field then a default background is used, otherwise you can click on the `Background' field to open a window for specifying a custom background.
  • an editor field `Bubble help' where you can enter text that should be displayed as the bubble help information for this attribute object.
  • two buttons `Ok' and `Cancel' for leaving the window.

If you are done with all settings, press the `Ok' button to leave the window.


15.3.4 Type Specific Settings

Besides the above items, the following type-specific items are present:

  • for attributes of type string there is an `Extras' page which contains:

    • a field `Display picture' that, if checked, attaches an image field to the string attribute for displaying the image whose filename is taken from the attribute contents. The image field is put above the string field. If you don't check this item then the settings of the fields `Title at string field', `Hide string field', and `Size' are meaningless.
    • a field `Title at string field'. If checked, the title of the attribute object is placed to the left of the string field, thus the image field gets more space in the window. If you don't check this field then the title is placed next to the image field.
    • a field `Hide string field' for removing the string field from the user interface. If checked, only the image field is displayed.
    • a field `Size' for specifying how size-handling is done for the image area. If `Resizable' is active, the object can be resized and might become larger than the size of its image. `Fixed' sets the object's size to the size of the image. If the image sizes vary from record to record then the object is resized accordingly every time. `Scrollable' adds two scrollers to the object allowing to view images that are larger than the visible region. If `Scaled' is activated then the image is scaled to the size of the display object. `Aspect-scaled' also scales the image but preserves its aspect ratio.
    • a field `File pop-up' that, if checked, adds a pop-up button to the right of the string field. This buttons serves to open a file dialog for choosing a filename.
    • a field `Font pop-up' for adding a pop-up button that opens a font dialog.
    • a field `List-view pop-up'. If checked, a pop-up button is attached to the right of the string field for opening a list-view pop-up where you can choose a string from a list. The label strings for the list-view pop-up are defined to the right of the `List-view pop-up' field. The label items can be either `Static' or `Computed'. If `Static' is chosen then the list of strings can be entered in the label editor which is opened after pressing the `Edit labels' button. For more information about the label editor, see Label editor. If `Computed' is chosen then a trigger function can be entered in the `Compute' field which is called whenever the pop-up button is pressed. This function should return a memo text with one label string per line, or NIL for an empty list (see Compute list-view labels). Only one of the fields `File pop-up', `Font pop-up' and `List-view pop-up' can be made active.
    • a field `View' that, if checked, adds a button to the right of the string field for launching an external viewer with the attribute contents as argument. This can be useful if you store filenames in the attribute and want to display the contents of a file by starting an external viewer. The external viewer can be specified in menu item `Preferences - External viewer' (see External viewer).

  • for attributes of type choice there is a field `Kind' where you choose whether the attribute contents should be displayed by a `Cycle button' or by a set of `Radio buttons'. If you select `Cycle button' then you can set the title position to one of `Left', `Right', `Top', or `Button'. If you select `Radio buttons' then two check mark items `Frame' and `Horizontal' allow drawing a border around the radio buttons and specifying a horizontal layout.

  • for attributes of type real there is an integer field `Num decimals' where you can enter the number of decimals for displaying the floating point values.

  • for attributes of type time there is a choice field `Format' for choosing how time values are displayed and entered. You can select between `HH:MM:SS', `MM:SS' and `HH:MM'. If `HH:MM' is chosen, the number of seconds are discarded for display and single numbers on input are regarded as the number of minutes.

  • for reference attributes there is an `Extras' page that contains the following items:

    • a `Display' section where you enter a record description which specifies the contents of a referenced record to be displayed. See Table object editor, for information on how to setup a record description. Note that the `Description' choice field also offers a `From table' entry. If selected, the settings of the table object are used for displaying a referenced record.
    • an area `Pop-up' where you specify which records of the referenced table should be made available for selection in the pop-up of the reference field and how they should be displayed. If `Records' is set to `All' then all records are available. If `Records' is set to `Match filter' then only the records of the referenced table that match the currently installed filter are available. If `Records' is set to `Computed' then a function for computing the set of records can be entered in the `Compute' field. This trigger function should return a list that is searched for the occurrence of records of the referenced table. Any such record found is shown in the pop-up. Non-record items are ignored. See Compute reference records, for more information about this function. In addition to the records specified by the `Records' setting, the initial record and the currently shown record in the referenced table can be added to the pop-up list by activating the `Initial record' and `Current record' items respectively.
    • a field `Show'. If checked then the GUI object for displaying the reference is created as a button. Clicking on this button will show you the referenced record in the table mask of the referenced table. For this the window the referenced table resides in is opened and brought to front if necessary.
    • a field `Auto show' that, if checked, adds a button to the right of the reference field for turning auto show mode on and off for this attribute. When turned on, the referenced table gets updated automatically with the referenced record whenever the user switches to another record.
    • a field `Filter' that, if checked, adds a button to the right of the reference field for turning on and off the reference filter for this attribute. See Reference filter, for more information about reference filters.

  • for virtual attributes the attribute object editor contains an `Extras' page with the following items:

    • a choice field `Kind' where you specify how the contents of the virtual attribute should be displayed. You can choose between `Boolean' that uses a check-mark field for displaying Boolean values, `Text' that uses a text field for displaying one line of text (including date, time, and numerical values), and `List' which uses a list-view for displaying a list of lines (e.g. the result of a select-from-where query).
    • if you set the `Kind' field to `Text' then two further fields are available: `Alignment' for specifying how the attribute contents should be presented and `Num decimals' for entering the number of decimals that should be used if the attribute contents are of type real.
    • if the `Kind' field has been set to `List' then further fields `Show titles', `Tab chain' and `On double click' are available. If `Show titles' is checked, the first line of the attribute contents is displayed as a title row in the list-view. Otherwise no title row is displayed and the first line is ignored. If `Tab chain' is checked, the object is part of the focus chain that can be cycled through by pressing the Tab key. Uncheck this item if you want to skip over the element. In `On double click' you can specify which action should take place when the user double-clicks a list item. `Do nothing' ignores the double click. `Show record' displays the record corresponding to the clicked item in the corresponding table view. If you select `Call trigger' then the name of a trigger function can be entered to the right. This trigger function is called on each double click. For more information about the trigger function, including the arguments that are passed to it, see Double click trigger.
    • a field `Auto update'. If checked, the virtual attribute is recomputed automatically whenever a dependent item changes. This includes switching to a different record in a dependent table, changing a dependent attribute, adding or deleting a record in a dependent table, changing the user/admin mode of the project, or recompiling the project program. The dependencies for the virtual attribute are obtained automatically from the virtual attribute's compute function. Use menu item `Project - Export structure' for viewing all obtained dependencies (you might need to recompile the project's program in order to update the dependencies when you turn this feature on). Note that the virtual attribute is recomputed irrespective of the record a dependent attribute is changed in and irrespective of whether the dependent attribute's value was changed in the user interface or during a program execution. However, the auto-updating of virtual attributes usually happens only after all other program executions are completed. If `Auto update' is unchecked, the value of the virtual attribute is only computed when it is explicitly queried or set in a program function.

  • For buttons there are the following additional fields:

    • a choice field `Kind' where you choose between `Text button' and `Image button'.
    • if you set the button kind to `Text button' then further fields `Title', `Font', `Background' and `Default' appear for entering the text to be displayed in the button, the font used for displaying the text, and the background settings.
    • if the button kind has been set to `Image button' then a field `Image' for specifying the image to be displayed and a field `Size' for specifying the size-handling of the image button are offered.


15.3.5 Text Editor

When you add a text object to the display list-view, or when you change one by double clicking on it, a window `Text' is opened. This window contains the following items:

  • a string field `Title' for entering the text that should be displayed.

  • a numerical field `Weight' for specifying the horizontal weight of the text object.

  • a choice field `Font' for specifying the font of the text. If you leave this field empty, a default font is used.

  • two fields `Background' and `Default' for specifying the background settings of the text object.

  • two buttons `Ok' and `Cancel' for leaving the window.

When you are done with all settings, press the `Ok' button to leave the window.


15.3.6 Image Editor

The image editor appears when you add a new image object or double click on an existing one. It contains the following items:

  • a field `Weight' for specifying the weight of the image object in the final window layout.

  • a field `Image' for specifying the image that should be displayed.

  • a field `Size' where you specify how resize-handling should be done. If you select `Resizable' then the image object can be resized. `Fixed' sets the object size to the size of the displayed image.

  • two buttons `Ok' and `Cancel' for leaving the window.

When you are done with all settings, click on the `Ok' button to close the window.


15.3.7 Space Editor

After you have added a space object to the display list-view, you can change its default settings by double clicking on it. This will open the `Space' window containing the following items:

  • a field `Delimiter' that, if checked, displays a vertical or horizontal bar (depending on the layout of the parent object) in the center of the space object. This is useful for separating parts in the window layout.

  • a numerical field `Weight' for specifying the weight of the object.

  • two fields `Background' and `Default' for specifying the background settings.

  • two buttons `Ok' and `Cancel' for leaving the window.

After you are done with all settings, press the `Ok' button to close the window.


15.3.8 Group Editor

After you have added a group object to the display list-view, you can change its settings by double clicking on it. This will open the `Group' window offering the following items:

  • a string field `Title' for entering a title string that should be displayed centered above the group. If you leave this field empty then no title is displayed.

  • a numerical field `Weight' for specifying the weight of this object.

  • two fields `Background' and `Default' for specifying the background settings.

  • a field `Border' that, if activated, draws a border frame around the group.

  • a field `Horizontal'. If checked, the layout of the group is done horizontally and the group is listed in the display list-view as `HGroup'. Otherwise the group is organized vertically and the display list-view will show a `VGroup' for this group.

  • a field `Spacing' that, if checked, adds some space between the group's child objects. Otherwise no space is put between the objects.

  • two buttons `Ok' and `Cancel' for leaving the window.

When you are done with all settings, press the `Ok' button to leave the window.


15.3.9 Register Group Editor

Double click on a register group object in order to change its settings. This will open the `Register group' window offering the following items:

  • a numerical field `Weight' for specifying the weight of this object.

  • an area `Labels' for specifying the label of each register page. You should specify exactly the same number of labels as there are elements in the register group. For more information on how to enter and edit the labels, see Label editor.

  • two buttons `Ok' and `Cancel' for leaving the window.

When you are done with all settings, press the `Ok' button to leave the window.


15.3.10 Window Editor

To change the settings of a window object, double click the window object. This will open the window editor containing the following items:

  • a string field `Title' where you enter a string that should be displayed in the window title bar and in the optional window button.
  • a string field `Id' (Amiga only) which can hold up to four characters defining the MUI window id. If an id is entered, the window position and size can be saved using MUI's snapshot window facility. Note that all ids defined within MUIbase should be unique. If you accidentally reuse an already taken id then the windows will share the same settings for their window dimensions. Ids beginning with an underscore `_' are reserved for internal use. If you leave the field empty then no MUI window id is set and the window dimensions are stored in the project file. The main window always has the first four characters of the project name as its window id. Specifying an window id is useful if a project is edited under different system configurations as the window positions are then taken from the individual configuration.
  • a field `Button' that, if checked, places a button for opening the window into the parent window. If this item is not checked then the window can only be opened from a MUIbase program using the SETWINDOWOPEN function (see SETWINDOWOPEN). The following items specify the appearance of the window button.
  • a string field `Shortcut' where you enter the shortcut for activating the window button.
  • an area `Enabled/disabled'. If `Always enabled' is selected then the window button is always enabled. `Disabled in initial' disables the button if it is inside a table and the table shows its initial record, otherwise it is enabled. If `Compute enabled' is chosen then a function for computing the enabled state of the window button can be entered to the right. The function does not take any arguments. If it returns NIL then the button is disabled, otherwise enabled. In case the compute function is left empty or cannot be found, the window button gets disabled. For more information on how to use this trigger function, see Compute enabled function. Additionally if the field `Close window when disabled' is checked then the window is closed automatically when the button gets disabled.
  • a numerical field `Weight' for specifying the weight of the window button.
  • a field `Font' for selecting the font of the window button. If you leave the field empty, a default font is used.
  • two fields `Background' and `Default' for specifying the background settings of the window button.
  • two buttons `Ok' and `Cancel' for leaving the window.

When you are done with all settings, press the `Ok' button to close the window.


15.4 Export Structure

Sometimes it is useful to get an overview of all tables and attributes of a project, e.g. when you want to write a MUIbase program. You can do this by selecting menu item `Project - Export structure'. This will ask you for a filename where the list of tables and attributes should be written to.

The output will first list the project name, followed by all tables in this project. For each table all attributes including their types and their optional trigger functions are listed. For virtual attributes also the dependencies for automatically updating the value of the virtual field are listed.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated on Oktober, 10 2017 using texi2html