PictureHorizontalAlignment: TabPictureHorizontalAlignment;
The PictureHorizontalAlignment property determines horizontal positioning of an image in a table cell.
To execute the example a form with a button on it with named Button1, the TabSheetBox component and the UiTabSheet component with the name "UiTabSheet1" which is the data source for TabSheetBox are required. The UiTabSheet1 is a 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.HoverPicture := 1;
Style.NormalPicture := 0;
Style.PushedPicture := 2;
Style.PictureHorizontalAlignment := TabPictureHorizontalAlignment.Left;
Style.PictureVerticalAlignment := TabPictureVerticalAlignment.Bottom;
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. The image is to be aligned to the bottom right edge of the cell.
See also: