Common Properties

The properties listed in the section are more-or-less common to all objects, although there are exceptions (for instance, KBForm and KBReport do not have an X-position nor Y-position).

Notes

This property appears in all objects. Rekall ignores it, but preserves its value. It is mainly intended for documentation. You might use it to store information which a script can retrieve ( A planned future feature of Rekall is user properties, whereby you can add arbitrary name/value pairs to an object. The main purpose of this would be to store information for use by scripts. )

X-Position, Y-Position, Width and Height (x, y, w, h)

These properties specify the location of the object on screen, relative to the object that that they are embedded in. The default is absolute position of the top-left corner, and absolue size, but note the X-mode and Y-mode properties below.

The X-position and Y-position properties do not appear for the top-level block (ie., for what is really a form or report object).

X-mode and Y-mode (xmode, ymode)

The X-mode setting controls the way that the object responds to changes in the width of its parent; the three posibilities are:

The Y-mode setting correspondingly applies to vertical position and height.

Whenever the X-mode or Y-mode value is changed (when in design view), the position and size values are adjusted so that the object remains at the same place on the screen (hence, you can lay out objects leaving X-mode and Y-mode set to the default Fixed value, then change them as required later on.

Note: If you have a block which displays more than one row of data, then while it makes sense to set a data controls X-mode (or Y-mode) to float, setting it to stretch may make it look very strange if the block changes size.

Control name (name)

Objects can be given names, the main use of which is in scripts in order to identify and access controls (for instance, a script can locate a control by name, then update its value). Although Rekall does not enforce this, you should probably not give the same name to two or more objects which are embedded in the same container (for instance, two fields in the same block), since accessing a control by name from a python script could refer to any of the objects. Using the same name for objects in different containers would not be a problem.

The standard Rekall python library supports the feature whereby setting a KBButton On Click event to #Click can be used to create simple record navigation buttons (First, Previous, Next, etc) by using the KBButton name to specify the operation; similarly #GoForm and #GoReport will invoke the form or report whose name is the KBButton name.

Background Colour (bgcolor)

English spelling, folks! This setting specifies the background color to be used in applicable objects, such as KBButton and KBField. It also applies to blocks.

Frame Style (frame)

Some control - such as blocks, labels and pixmaps - can have a frame. There are three components to the frame, a shadow effect (plain, sunken or raised), a shape (various options such as panel and winpanel) and a width. The property dialogs for the objects allow these to be controlled individually, and show an image of the general effect.

Text Colour (fgcolor)

This setting specifies the text color to be used in applicable objects, such as KBButton and KBField.

In form labels and in the rich text control, text colour (as well as other properties) can also be set if the text that is displayed is formatted using the QT Rich Text format. See Troll Techs's QT documentation for details.

Display Expression (expr)

This setting appears for objects that actually display data, such as KBField and KBChoice, and is the expression used to retrieve data from the server database. It must therefore be a valid SQL expression (for the type of SQL server; Rekall does not provide server independance at this level).

This expression may be empty, in which case the control does not interact with the server database. Values may be set and retrieved by scripts.

A special case is an expression of the form = expr where expr is a valid python expression, in which case the expression is evaluated when a value from a server database would otherwise be displayed. For example, = time.strftime("%d-%b-%y", time.localtime (time.time())) will show the current date (provided that the python time module is imported).