TxtSelectReference Method

Build 1501 on 14/Nov/2017  This topic last edited on: 23/Mar/2016, at 12:16

Description

Selects the object referenced by the current text.

Syntax

Page.TxtSelectReference(bExtend)

bExtend

If TRUE, adds to the current selection.

Remarks

Returns error code.

Example

 Public Sub TxtSelectReference()

    Dim iCurImgId, iArtId As Long

    iArtId = Fred.GetCurArticleId

    iCurImgId = 0

    If iArtId <> 0 Then

      Dim objarticle = Fred.GetActiveArticle()

      Dim objref = objarticle.GetRefObj(objarticle.GetCurTxtIdx) ' qui si passa il numero d’ordine dell’elemento nell’articolo

      If Not objref Is Nothing Then

        iCurImgId = objref.Id

      End If

      If iCurImgId = 0 Then

        MsgBox("not an image")

      Else

        Page.TxtSelectReference(True)

      End If

    Else

      MsgBox("not an article")

    End If

  End Sub

Context

Page designer

All image related commands

AddImageEx, ArticleNewPicture, ImgInsert, ImgInsertId, ImgInsertType, ImgNewDummyEx

ImgCrop, ImgSetCrop, GetImgCropHeight, GetImgCropLeft, GetImgCropTop, GetImgCropWidth, GetImgHeight, GetImgWidth

ImgZoom, ImgZoomPct, ViewZoomImage, GetImgZoomPctX, GetImgZoomPctY

GetSelectedImgId, GetSelectedImgDummy,

ImgGetColor, ImgSetColor, ImgGetFlag, ImgSetFlag, ImgImportPath Method

ImgTrace, ImgTraceDlg, ImgTraceEx

ImgUpdate, TxtSelectReference, ViewShowImg