Thumbnail(Size: IGxSizeF): IGxImage;
Thumbnail[Size: Prognoz.Platform.Interop.Drawing.GxSizeF]: Prognoz.Platform.Interop.Drawing.GxImage;
The Thumbnail property returns the icon of chart external legend element. The property is read-only.
Size. Icon size.
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(Null) As 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(12, 12);
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.
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(12, 12);
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: