HoverPicture: Integer;
The HoverPicture property sets index of the image to be displayed in the table cell, when the cursor hovers over the image.
Collection of the table images is available in the Images property. To use images in the cell, set the EnablePictures property to TriState.OnOption. The image that is set in this property is not displayed if the NormalPicture image is not set.
Executing the example requires a form and the components located on the form: the UiTabSheetBox component named UITabSheetBox1, the ImageList component named ImageList1 and the TabSheetBox component. UiTabSheet1 is set as a data source for TabSheetBox.
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 := 1;
Style.HoverPicture := 2;
End Sub Button1OnClick;
Clicking the button adds images of the ImageList1 component to the table images collection. The image having the index 1 is displayed for the selected cells' range in normal mode. On hovering the cursor over it, the image with the index 2 is displayed.
See also: