IChartExternLegendItem.Thumbnail

Fore Syntax

Thumbnail(Size: IGxSizeF): IGxImage;

Fore.NET Syntax

Thumbnail[Size: Prognoz.Platform.Interop.Drawing.GxSizeF]: Prognoz.Platform.Interop.Drawing.GxImage;

Description

The Thumbnail property returns the icon of chart external legend element. The property is read-only.

Parameters

Size. Icon size.

Example

Executing the example requires a regular report with the Report identifier. The report includes the following objects: a chart and an external legend.

Sub UserProc;
Var
    sizef: IGxSizeF;
    image: IgxImage;
    mb: IMetabase;
    rep: IPrxReport;
    legend: IPrxChartLegend;
    chartlegend: IChartExternLegend;
    items: IChartExternLegendItems;
    item: IChartExternLegendItem;
Begin
    mb := MetabaseClass.Active;
    rep := mb.ItemById("OBJ12399").Open(NullAs IPrxReport;
    legend := (rep.ActiveSheet As IprxTable).TabSheet.Objects.Item(2).Extension As IPrxChartLegend;
    chartlegend := legend As IChartExternLegend;
    items := chartlegend.InternalItems;
    item := Items.Item(0);
    sizef := New GxSizeF.Create(1212);
    image := item.Thumbnail(sizef);
    image.SaveToFile("c:\123.bmp");
End Sub UserProc;

After executing the example the icon with the specified size is saved to the file.

Fore.NET Example

Executing the example requires a regular report with the Report identifier. The report includes the following objects: a chart and an external legend.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Interop.Drawing;

...

Public Shared Sub Main(Params: StartParams);
Var
    sizef: GxSizeFClass;
    image: IgxImage;
    mb: IMetabase;
    rep: IPrxReport;
    legend: IPrxChartLegend;
    chartlegend: IChartExternLegend;
    items: IChartExternLegendItems;
    item: IChartExternLegendItem;
Begin
    mb := Params.Metabase;
    rep := mb.ItemById["OBJ42859"].Edit() As IPrxReport;
    legend := (rep.ActiveSheet As IprxTable).TabSheet.Objects.Item[1].Extension As IPrxChartLegend;
    chartlegend := legend As IChartExternLegend;
    items := chartlegend.InternalItems;
    item := Items.Item[0];
    sizef := New GxSizeFClass();
    sizef.Create(1212);
    image := item.Thumbnail[sizef];
    image.SaveToFile("c:\123.bmp");
    End Sub;
End Class;

After executing the example the icon with the specified size is saved to the file.

See also:

IChartExternLegendItem