From 4D v15 R5, you can add an icon in the listbox header by programming. The image can come from a file, a picture variable or the picture library. This icon can be placed on the left or on the right side of the column.
Since you can replace the icon programmatically, you can display your own customized order arrows, an icon based on of the displayed content, or using SVG, even dynamically created images, such as the number of unread emails.
We have adapted the two following commands:
- OBJECT Get format ( { * ;} object )
- OBJECT SET FORMAT ( { * ;} object ; displayFormat )
To format a list box header, in the “displayFormat” parameter, pass a character string respecting the following syntax “picture;iconPos” where:
- picture: Picture linked to a header that comes from a picture library or a picture variable:If the picture comes from a picture library, enter its number, preceded by a question mark (e.g.: “?250”).If the picture comes from a picture variable, enter the variable name.If the picture comes from a file stored in the Resources folder of the database, enter a URL of the type “#{folder/}picturename” or “file:{folder/}picturename”.
- iconPos: position of the icon. Two values are possible: iconPos = 1 meaning Left or iconPos = 2 meaning Right
For more details, please take a look at the 4D v15 R5 upgrade manual.