ITabCellStyle.NormalDetachedPicture

Syntax

NormalDetachedPicture: IGxImage;

Description

The NormalDetachedPicture property loads the selected image to a table cell.

Comments

To use images in the cell, set the ITabCellStyle.EnablePictures property to TriState.OnOption.

Images can be added from a folder using the ImageBox and ImageList components.

To add an image from the collection, use the ITabCellStyle.NormalPicture property.

Example

To execute the example, place on the form the Button component named BUTTON1, the TabSheetBox component named TABSHEETBOX1 and the UiTabSheet component named UITABSHEET1. For the TabSheetBox component set the Source property to UiTabSheet1. Make sure that the root of the C drive contains the Image.png image.

Add links to the Drawing, Forms, and Tab system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Sheet: ITabSheet;
    Range: ITabRange;
    Style: ITabCellStyle;
    Image: IGxImage;
Begin
    Sheet := UiTabSheet1.TabSheet;
    Range := Sheet.View.Selection.Range;
    Image := GxImage.FromFile(
"C:\Image.png");
    Style := Range.Style;
    Style.EnablePictures := TriState.OnOption;
    Style.NormalDetachedPicture := Image;
End Sub Button1OnClick;

As a result, clicking the button adds the specified image to the selected table cell, for example:

See also:

ITabCellStyle