ITabHyperlink.Apply

Syntax

Apply(Value: ITabHyperlink);

Parameters

Value is the hyperlink, the parameters of which must be applied to the current hyperlink.

Description

The Apply method applies the parameters of the specified hyperlink to the current one.

Example

Executing the example requires a regular report with the REGL_REP identifier.

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Rep: IPrxReport;

Tab: ITabSheet;

Range: ITabRange;

Hyperlink, Hyperlink1: ITabHyperlink;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemById("REGL_REP").Edit;

Rep := MObj As IPrxReport;

Tab := Rep.ActiveSheet.Table;

Range := Tab.Cell(0, 0);

Hyperlink := Range.Style.Hyperlink;

Hyperlink.Action := "=a0:b3";

Hyperlink.Enable := TriState.OnOption;

Hyperlink.SeparateLinkText := TriState.OnOption;

Hyperlink.Text := "Hyperlink";

Range := Tab.Cell(1, 0);

Hyperlink1 := Range.Style.Hyperlink;

Hyperlink1.Apply(Hyperlink);

MObj.Save;

End Sub Main;

After executing the example, a hyperlink with the Reference text will be created in the A0 cell of the regular report; on clicking it, the A0:B3 range will be selected. In the A1 cell a hyperlink will be created, to which the parameters of the hyperlink from the A0 cell will be applied.

See also:

ITabHyperlink