ITabImages.AddFromImageList

Syntax

AddFromImageList(ImageList: IImageList);

Parameters

ImageList — component containing the images collection.

Description

The AddFromImageList method imports an image set from the component, which identifier is passed as the ImageList input parameter, to the table images collection.

Example

Executing the example requires a form with the Button1 button located on it, the TabSheetBox component, the UiTabSheet component named UiTabSheet, and the 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 images collection of the table. The first image of the set is displayed for the selected cells' range in normal mode.

See also:

ITabImages