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.

Widget Overview
Logical widget name: Picture
Maps to physical widget:

upicture

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

Picture Widget Properties

Property

Technical Name

Dynamic

3-D Effect (3d)

3D

Yes

Allow Vertical Expansion (AllowVerticalExpansion)

AllowVerticalExpansion

Yes

Attach to Window Border (attach)

Attach

Yes

Background Color (BackColor)

BackColor

Yes

Foreground Color (ForeColor)

ForeColor

Yes

Frame

Frame

Yes

Horizontal Alignment (Halign)

Halign

Yes

Horizontal Scaling (Hscale)

Hscale

Yes

Horizontal Scroll Bar

Hscroll

Yes

Hover View (HoverView)

HoverView

Yes

Label Font (LabelFont)

LabelFont

Yes

Monochrome Bitmap (Monochrome)

Monochrome

Yes

Mouse Pointer (Cursor)

Cursor

Yes

Preserve Aspect Ratio (PreserveAspect)

PreserveAspect

Yes

Switch Palette (SwitchPalette)

SwitchPalette

Yes

Tool Tip Text (ToolTipText)

ToolTipText

Yes

Transparency

Transparency

Yes

Value and Representation

Yes

Vertical Alignment (Valign)

Valign

Yes

Vertical Scaling (Vscale)

Vscale

Yes

Vertical Scroll Bar (VScroll)

Vscroll

Yes

Attach Margin (AttachMargin)

AttachMargin

Yes

Popup Rectangle (PopupRect)

PopupRect

Yes

 

Drag-and-Drop Properties
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

Related Topics