[Date Prev][Date Next] [Thread Prev][Thread Next]
[Date Index] [Thread Index] [New search]

Re: FDK How do I select an anchored frame



On Mon, 29 Nov 1999 12:46:50 -0500, "Rick Quatro" <frameexpert@mindspring.com>
wrote:

>Hi Framers,
>
>The Frame FDK Faq has the following statement:
>
>"You can use F_ApiImport() to import a graphic file into an existing
>anchored frame. If the frame is selected first, then the graphic will be
>imported into it rather than at the specified text range. The following
>function imports a graphic into the (previously) selected anchored frame. It
>will be necessary to locate and programmatically select the FO_AFrame before
>using this function."
>
>My question regards the last sentence. How do you "programmatically select
>the FO-AFrame"? Thanks.

F_ApiSetInt(docId, aframeId, FP_GraphicIsSelected, True);

I do not think this also clears other graphic selections; it very likely
leaves them and is additive.  So you should UNselect any other graphics 
first (unless you just opened the doc and know there are none)...

for (objId = F_ApiGetId(FV_SessionId, docId, FP_FirstSelectedGraphicInDoc);
  objId != 0;
  objId = F_ApiGetId(docId, objId, FP_NextSelectedGraphicInDoc))
    F_ApiSetInt(docId, objId, FP_GraphicIsSelected, False);

Then you can set the one you want with the assurance that it's the only
graphic selection.  I don't know if a text selection would be a problem...

-- Jeremy H. Griffith, at Omni Systems Inc.
  (jeremy@omsys.com)  http://www.omsys.com/

** To unsubscribe, send a message to majordomo@omsys.com **
** with "unsubscribe framers" (no quotes) in the body.   **