upicture (Picture)
The upicture
widget is used to displays the contents of an Image field. Uniface provides a logical widget called Picture, which is mapped to upicture
.
For more information, see Specifying a Widget for a Field or Entity.
Logical widget name: | Picture |
Maps to physical widget: |
|
Default definition: | Picture=upicture
|
Use for: | String fields (not Date) |
Supported triggers: | See Triggers |
Supported properties: | See Widget Properties |
Supported in egrid (Grid) widget? |
No |
Supports MSAA? : | No |
Description
A upicture
widget displays an image. The Value property of the field widget can
specify an image on disk, a glyph in a library, or image data from the database (sometimes known as
Binary Large OBjects, or BLOBs).
Picture fields are normally used for display purposes only. They do not support facilities for editing the image in the field. Some structure editor functions can be used to dump to or load from file and to cut, copy, or paste via the native GUI clipboard.
This widget is not supported in character mode. It is mapped to a text field.
Drag and Drop Behavior
The upicture
widget also supports drag-and-drop
behavior. For example, it is possible to drag an image from a upicture
widget into a utree
widget, or vice
versa, or from one upicture
widget to another. When an image object is dragged over the target,
Uniface determines which drag-and-drop format to use, and the appropriate cursor.
To program such drag-and-drop behavior, you need to define drag-and-drop formats and edit the interactive triggers for the behavior you want.
When a drop action takes place, the relevant
interactive triggers are fired, once for each selected object. If the ProcScript in an interactive
trigger returns -1, the associated object is not dropped. If ProcScript returns
-2
, dropping of all objects is aborted.
For more information, see Defining Drag and Drop Behavior for Picture and Tree Widgets
Triggers
- trigger detail—activated by double-clicking while the field has focus.
- trigger valueChanged—activated if the value of the field changes as a result of a paste operation, the ^INS_FILE function, or anything else that empties the field.
In Microsoft Windows, also:
Widget Properties
Property |
Technical Name |
Dynamic |
---|---|---|
3D |
Yes |
|
AllowVerticalExpansion |
Yes |
|
Attach |
Yes |
|
BackColor |
Yes |
|
ForeColor |
Yes |
|
Frame |
Yes |
|
Halign |
Yes |
|
Hscale |
Yes |
|
Hscroll |
Yes |
|
HoverView |
Yes |
|
LabelFont |
Yes |
|
Monochrome |
Yes |
|
Cursor |
Yes |
|
PreserveAspect |
Yes |
|
SwitchPalette |
Yes |
|
ToolTipText |
Yes |
|
Transparency |
Yes |
|
— |
Yes |
|
Valign |
Yes |
|
Vscale |
Yes |
|
Vscroll |
Yes |
|
AttachMargin |
Yes |
|
PopupRect |
Yes |
Property | Technical Name | Dynamic? |
---|---|---|
Supported Drag Formats (DragFormat) | DragFormat | Yes |
Accepted Drop Formats (DropFormat) | DropFormat | Yes |
Use Field Actions for All Drop Formats (DropActions) | DropAction | Yes |