Clone: ITabRange;
Clone: Prognoz.Platform.Interop.Tab.ITabRange;
The Clone method creates a copy of a cell range.
When this method is called a new cell range is created. Those properties that are common for the source range are copied and set for the new range.
To execute the example a form that contains the Button component with the Button1 identifier, the TabSheetBox component with the TabSheetBox1 identifier and the UiTabSheet component with the UiTabSheet1 identifier are required. Specify the UiTabSheet1 as a data source for the TabSheetBox1 component.
The example is a handler of the OnClick event for the Button1 component.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
TSheet: ITabSheet;
r, r1: ITabRange;
Begin
TSheet := UiTabSheet1.TabSheet;
r := TSheet.View.Selection.Range;
r1 := r.Clone;
Debug.WriteLine("Address of selected cell range: " + r1.Address);
End Sub Button1OnClick;
On clicking the button the "r1" variable contains a copy of the selected range, the development environment console displays the address of the selected cell range.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example. Use Fore.NET analogs instead of Fore components.
Imports Prognoz.Platform.Interop.Tab;
…
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
TSheet: ITabSheet;
r, r1: ITabRange;
Begin
TSheet := uiTabSheetNet1.TabSheetUi.TabSheet;
r := TSheet.View.Selection.Range;
r1 := r.Clone();
System.Diagnostics.Debug.WriteLine("Address of selected cell range: " + r1.Address);
End Sub;
See also: