|
|
 |
 |
| AddImageColumn |
| |
Add an image column to a list |
| |
| Library |
 |
module::system/webui/lists.whlib |
| |
| Syntax |
 |
PUBLIC MACRO AddImageColumn (STRING name,STRING header,INTEGER width,STRING imgdescr,INTEGER imgwidth,INTEGER imgheight) |
| |
| Description |
 |
The AddImageColumn macro creates a list column containing an image. In contrast to the AddIconColumn macro, AddImageColumn allows you to specify the width and height of the image to use |
| |
| Parameters |
 |
| name |
 |
The name of the cell of the list item, containing the path to and name of the image |
 |
| Header |
 |
Text that is displayed in the header of this column |
 |
| width |
 |
Relative width of the column |
 |
| imgdescr |
 |
The name of the list item's cell containing the alternative textual description for the image. |
 |
| imgwidth |
 |
The image's width in pixels |
 |
| imgheight |
 |
The height of the image, in pixels |
 |
|
| |
| Example |
 |
// Every item will contain an 'image' and a 'description' cell
listitems :=
SELECT title
, image := isActive ? "/modules/mymodule/img/active.png"
: "/modules/mymodule/img/nonactive.png"
, description := "description for image " || item.title
FROM items;
CreateList (listitems);
AddImageColumn ("image","Header",1,"description",19,15); | |
|
|
|
|