ITabHyperlink.Target

Fore Syntax

Target: TabHyperlinkTarget;

Fore.NET Syntax

Target: Prognoz.Platform.Interop.Tab.TabHyperlinkTarget;

Description

The Target property determines how the page is loaded after clicking the link.

Fore Example

This example assumes that a Report object of the IPrxReport type exists.

Sub main;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Rep: IPrxReport;
    Tab: ITabSheet;
    Range: ITabRange;
    Hyperlink: ITabHyperlink;
Begin
    MB:= MetabaseClass.Active;
    MObj:= MB.ItemById("REGULAR_REPORT").Edit;
    Rep:= MObj As IPrxReport;
    Tab:= (Rep.ActiveSheet As IprxTable).TabSheet;
    Range:= Tab.Cell(00);
    Hyperlink:= Range.Style.Hyperlink;
    Hyperlink.Action:= "http://www.example.com";
    Hyperlink.ActionType:= TabHyperlinkActionType.OpenURL; 
    Hyperlink.Enable:= TriState.OnOption;
    Hyperlink.Target:= TabHyperlinkTarget.Blank;
    Hyperlink.SeparateLinkText:= TriState.OnOption;
    Hyperlink.Text:= "Company web site";
    MObj.Save;
End Sub main;

After executing this example clicking the hyperlink opens page in new browser window.

Fore.NET Example

This example assumes that a Report object of the IPrxReport type exists.

Public Shared Sub Main(Params : StartParams);
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Rep: IPrxReport;
    Tab: ITabSheet;
    Range: ITabRange;
    Hyperlink: ITabHyperlink;
Begin
    MB:= Params.Metabase;
    MObj:= MB.ItemById["REGULAR_REPORT"].Edit();
    Rep:= MObj As IPrxReport;
    Tab:= (Rep.ActiveSheet As IprxTable).TabSheet;
    Range:= Tab.Cell[00];
    Hyperlink:= Range.Style.Hyperlink;
    Hyperlink.Action:= "http://www.example.com";
    Hyperlink.ActionType:= TabHyperlinkActionType.thatOpenURL; 
    Hyperlink.Enable:= TriState.tsOnOption;
    Hyperlink.Target:= TabHyperlinkTarget.thtBlank;
    Hyperlink.SeparateLinkText:= TriState.tsOnOption;
    Hyperlink.Text:= "Company web site";
    MObj.Save();
End Sub;

After executing this example clicking the hyperlink opens page in new browser window.

See also:

ITabHyperlink