ITabCellStyle.EnablePictures

Syntax

EnablePictures: TriState;

Description

The EnablePictures property determines whether images should be used in table cells.

Comments

If this property is set to the TriState.OnOption value, an image can be set for the cells using this style. Use the NormalPicture, HoverPicture and PushedPicture properties to specify indexes of images to be displayed for various states. Index of the image to be used as the cell background can be set using the BackgroundPicture property. All used images are to be loaded to the Images collection of the table.

Example

Executing the example requires a form with the Button1 button located on it, a TabSheetBox component, a UiTabSheet component named UiTabSheet, and an ImageList component named ImageList1. UiTabSheet1 is the data source for the TabSheetBox component. The ImageList1 component contains a certain set of images.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

TSheet: ITabSheet;

TRange: ITabRange;

Style: ITabCellStyle;

Begin

TSheet := UiTabSheet1.TabSheet;

TSheet.Images.AddFromImageList(ImageList1);

TRange := TSheet.View.Selection.Range;

Style := TRange.Style;

Style.EnablePictures := TriState.OnOption;

Style.NormalPicture := 0;

End Sub Button1OnClick;

On clicking this button images of the ImageList1 component are added to the image collection of the table. The first image of the set is displayed for the selected cells' range in normal mode.

See also:

ITabCellStyle