Loading...
 

ObjectCombobox, ObjectCbox

ObjectCombobox, ObjectCbox

ObjectCombobox(name~aliasName, flags, x, y, w, h)

Parameters
Parameters Description
name * Identifier or CLASS::expr
aliasName an additional identifier
flags Flags
x * Position X (in minicells)
y * Position Y (in Minicells)
w * Width (in minicells)
h * Height (in minicells)
  • - Required parameter

The tuple (class, access expression) defines an image on model data (see FillWindow, DrainWindow). With the ObjectCombobox relations between objects can be displayed and edited interactively.

This is the specification of the object box as a combo box. Each entry represents exactly one object and shows selected data related to the object.

The specified height is not used to determine the height of the input field. This is determined by the font size - similar to the string widget, for example. Instead, the specified height determines the maximum height of the expanded selection list.

The ObjectCombobox is programmed with the following instructions:

Flags
Flag Description
CAR_POSITION The X-positions are calculated automatically, so they do not have to be explicitly specified with SetFormat .
NULL_ELEMENT

The combo object box automatically creates an entry that does not refer to any object. A NULL element is useful if the object box with FillWindow and DrainWindow is used to display a pointer or a 1-1 or 1-m relation.

ENTIRE If the ENTIRE flag is set, the referenced element is automatically loaded into the Object User Box during FillWindow, so it is not necessary to fill the Object User Box manually. This is especially useful in combination with NULL_ELEMENT to load only the referenced element from a large set instead of the whole set in the object box and to offer the possibility to remove the reference. The object box then only offers the possibility to remove or keep the reference, changing the reference to another object is then no longer possible with the object box.
HIDDEN The object box remains invisible until the instruction Show makes it appear on the screen.
MIN_HEIGHT(h) The height of the widget never falls below the value h (specified in minicells). This is especially useful in combination with attachments.
MIN_WIDTH(w) Width of the widget never falls below the value w (specified in minicells). This is especially useful in combination with attachments.
NO_DRAIN The object box is filled by FillWindow, but is ignored by DrainWindow.
TOOLTIP(mlString) The specified string is displayed as a tooltip or, if an event TOOLTIP is also defined, is passed to it. The tooltip is automatically triggered by the system after a certain period of time when the mouse cursor remains over the window object. The string can be multilingual. The current entry for the set language is passed to the event.
CONTEXTMENU(identifier)

The identifier is an identifier of an item within a Menu or ContextMenuList declaration. The submenu hanging under this item is automatically displayed when the right mouse button is pressed. If thereupon a menu item is selected, the respective action is started as described for item, in the same way as if the menu item had been called from the main menu.
In addition, however, when SELECT is executed for the corresponding item with GetCurrentWidget you can determine from which window object the menu item was called via ContextMenu. With a call from the main menu GetCurrentWidget returns NULL.

If a ContextMenu should not appear automatically, then it can be called (according to design guidelines this should be done as reaction to the right mouse button, thus within MOUSE_CLICK_R ) by means of PopupMenu also from InstantView®. In this case you should not use the CONTEXTMENU flag, otherwise the menu will appear twice (once automatically, once controlled).

ACCEPT_DROP Objects dragged from an object box across the screen can be placed in the combo object box by using drag and drop. What to do with the objects must be described in the action list (see example).
LIST_INVALID (from 4.2) Normally, only valid objects are added to an Object User Box. However, when this flag is set, invalid objects are also included and displayed.
HELP(anchor) Help("file#anchor") connects the window object with online help in HTML format. If no file name is specified, the HTML file specified in the module applies.
HELP(s)

If you prefer to use the platform's help system (OS/2 PM, MS Windows), enter an integer n which refers to the corresponding help window. Where n must be < 40000.

Note: HTML is recommended as the online help for InstantView® application for portability reasons.

Transaction cancellation
If a transaction is aborted (AbortTXN, Attention(AbortTXN), etc.) the combo box is emptied - but only if it was changed within the transaction. This ensures that the combo box does not contain objects that may no longer exist (e.g. new persistent objects that are deleted by the transaction termination).