InsObjDlg Method (Article)

Build 1501 on 14/Nov/2017  This topic last edited on: 22/Mar/2016, at 17:07

Description

Displays a dialog and inserts an object (picture, multi-media elements etc.) of the objType type in the article at the specified position.

Available in Ted and Fred.

Syntax

object.InsObjDlg (nIdx, objType, nBasketId)

object

Required. Object name. Returned by Ted.GetActiveArticle.

nIdx

Insert position of the object, ranging from 0 = before the first element in the article to NTxts = after the last element in the article.

If it is not possible to insert objects of the specified type at this position the function fails with an error message.

If this parameter is negative the user is prompted to select an insertion position amongst all the valid ones for an object of the specified type. To get the idx of the current element, use GetCurTxtIdx.

objType

A string identifying the type of object to insert.

nBasketId

Id of the initial basket for the object selection dialog - if it is 0 the dialog starts in the same basket of the last selected object of the same kind.

 

Remarks

The user is prompted to select the object to insert with a standard dialog with title/desk/basket selectors. In Fred, it does not prompt to select a picture if the object kind is 'img'.

A new text referencing the selected object is automatically created and inserted in the article. If more that one element type support the specified object type (e.g. we are inserting a picture and two different element types in the article structure can reference a picture) the user is prompted to chose one.

Context

Article object

See also

InsChildNode, InsNewTxt, InsNodeAtCur, InsObj, InsTxt, InsTxtDlg.