ExpanderLength(Row: Integer; Column: Integer): Integer;
ExpanderLength[Row: integer; Column: integer]: integer;
Row. Index of the row that contains the expander. Admissible parameter value lies within the range [0;ITabSheet.RowsCount).
Column. Index of the column that contains the expander. Admissible parameter value lies within the [0; ITabSheet.ColumnsCount) range.
The ExpanderLength property returns the number of rows or columns affected by the expander.
If the ExpanderLength property is positive, the expander opens down and to the right; if the value is negative, the expander opens up and to the left.
To create an expander, use the ITabSheet.CreateExpander method.
Executing the example requires that the repository contains a regular report with the REP_TABSHEET identifier.
Add links to the Drawing, Metabase, Report, Tab system assemblies.
Sub UserExp;
Var
MB: IMetabase;
Rep: IPrxReport;
SheetT: IPrxTable;
Tab: ITabSheet;
Exp: Integer;
Begin
MB := MetabaseClass.Active;
Rep := MB.ItemById("REP_TABSHEET").Bind As IPrxReport;
SheetT := Rep.Sheets.Item(0) As IPrxTable;
Tab := SheetT.TabSheet;
Exp := Tab.ExpanderLength(0, 0);
If Exp <> 0
Then Debug.WriteLine("Expander size: " + Exp.ToString + " (columns/rows)");
Else Debug.WriteLine("No expander in the specified cell");
End If;
End Sub UserExp;
Example execution result: the console shows size of the expander located in the specified cell.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example.
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Rep: IPrxReport;
SheetT: IPrxTable;
Tab: ITabSheet;
Exp: Integer;
Begin
MB := Params.Metabase;
Rep := MB.ItemById["REP_TABSHEET"].Bind() As IPrxReport;
SheetT := Rep.Sheets.Item[0] As IPrxTable;
Tab := SheetT.TabSheet;
Exp := Tab.ExpanderLength[5, 0];
If Exp <> 0
Then System.Diagnostics.Debug.WriteLine("Expander size: " + Exp.ToString() + " (columns/rows)");
Else System.Diagnostics.Debug.WriteLine("No expander in the specified cell");
End If;
End Sub;
See also: