2.254 .picture[integer]

The attribute defines the images (tile resources) that are displayed to the left of each entry.

At the listview, the attribute defines the large icons for the list items.

Definition

  • Data type

    object [ tile ]

  • Access

    get, set

  • changed event

    yes

listbox, poptext

The value range for the index is 1 … .itemcount. The respective item .content[I] in the listbox or .text[I] in the poptext must already exist before the attribute .picture[I] with the corresponding index may be accessed.

For selected entries the image defined in .picture_hilite[integer] is displayed – when available (not supported by the IDM for Motif).

The size of the space provided for the images to the left of the entries is determined by the .picwidth and .picheight attributes.

At the listbox the attribute is not inherited.

With a poptext with .style = edittext or .style = listbox, no picture is displayed in the input field.

Note for the IDM for Qt

If in listbox and poptext a tile is only set for .picture_hilite[I], but not for .picture[I], then Qt will display the tile defined in .picture_hilite[I] (or a slight modification of it) even in the unselected state. Qt always tries to provide images for all states for the list entries. If the image is missing for a state, Qt generates it from the images provided.

listview

The attribute defines the large icon for each list item.

The value range of the index is 0 … .rowcountt, where the value with index 0 is used as default value for not set values in the range 1 … .rowcount.

Value range

null

The displayed icon is derived as follows:

  • If .picture[0] <> null, the icon defined there is used.
  • If .picture[0] = null, then the small icon is shown enlarged (.smallpicture[I] or .smallpicture[0], depending on presence).
  • If there is neither a large nor a small icon, the item is displayed without an icon.

tile

Resource that contains the large icon.

The large icon will be shown in the icon view (.style = "icon", .style = "picture") and in the tile view (.style = "tile").

Large and small icons belong together and should represent the same information. Both icons can only be referenced together. Therefore, different combinations should be avoided, as each combination will consume additional memory.

Note

Changing the attribute in the visible state may cause the object to flicker.

treeview

The value range for the index is 0 … .itemcount. The tile resource in .picture[0] on the one hand defines the size of the images, on the other hand it is displayed for all items where .picture[I] with 1 <= I <= .itemcount is not set (null). All other images are scaled to the size of .picture[0] regardless of the .scale attribute on the tile resource.

If .picture[0] is not set (null), the size of the pictures is determined by the system and is 16x16 pixels. A substitute icon (white cross on red background) will then be displayed for items without a picture.

Before the attribute .picture[I] with 1 <= I <= .itemcount may be accessed, the item .content[I] with the respective index must already exist.

Space for pictures to the left of the items is only provided if .picture[I] is set for at least one index.

The attribute is not inherited.

The attribute is not supported by the IDM for Motif.

Note for the IDM for Windows

When using a Windows Icon Resource in .picture[0], the pictures always have the default size of 16x16 pixels.