CellIcon

Revision as of 16:15, 11 May 2018 by Lchrisman (talk | contribs) (Created page with "category:Cell format functions ''This function is not officially supported or exposed on menus yet and may be subject to change in a future release. It was first introduc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


This function is not officially supported or exposed on menus yet and may be subject to change in a future release. It was first introduced in Analytica 5.0..

CellIcon( icon, side )

Displays an image (icon) in a cell, next to a cell value. «icon» is an image. «side» can be 'Right', 'Left' or 'IconOnly'.

This can be used from the Cell Format Expression attribute.

Examples

CellIcon example up-down icons.png

The above screenshot uses CellIcon in two ways. First, an icon appears to the right of Staff development, indicating that the projects are sorted in decreasing order by the values in that column, and second, in the Net revenues column to show the the sign of the value. These were implemented using the following code in the Cell Format Expression attribute:


CellFormats(

CellSpan(Attributes_for_score, CellFormats( If Attributes_for_score=sort_col Then CellIcon( vis_icon,'Right' ), CellOnClick( New_sort_crit(self, ViewMode) ) ), header:true ), If Attributes_for_score='Net revenues' Then CellIcon(If self>0 Then up_icon Else if self<0 Then down_icon, 'Left')

)
Comments


You are not allowed to post comments.