Images in ValRep Lists

For the drop-down list, list box, and drag-and-drop widgets, the Representation can also specify an image (file or glyph) in the Representation.

To display an image in the Representation of each item, use Gold ! after the image name:

@Image | ^Glyph!:Text

For example, the following ProcScript produces a list showing the Uniface icons (although the list has been abbreviated) :

putitem/id vList, "a",  "^U7_ENTANA !Initial Data (Entities)"
putitem/id vList, "b",  "^U7_DTDSTD !DTDs"
putitem/id vList, "c",  "^U7_FRMSTD !Startup Shells"
...

$fieldvalrep(listbox)=vList

Graphical content.

Each Representation consists of a glyph and text.

To define a ValRep item that contains only an image, with no text, use a percent sign (%) after the Gold !. For example:

$fieldvalrep(ListBox)="@mail.png!%;@calendar.png!%;contacts.png!%"

Note:  Images are not displayed when a dynamic drop-down list does not have the focus. Images in ValRep Lists are not supported by Grid widget fields.

Related Topics