Article View: adobe.indesign.sdk
Article #154CS3 / Win: Lock an anchored text frame
From: Hans Stoessel
Date: Mon, 23 Mar 2009 15:31
Date: Mon, 23 Mar 2009 15:31
37 lines
1682 bytes
1682 bytes
Hi
I lock frames using the following code (snippet):
...
InterfacePtr<ICommand> ipSetStoryLockStateCmd(CmdUtils::CreateCommand(kSetItemLockDataCmdBoss));
InterfacePtr<IBoolData> ipLockData(ipSetStoryLockStateCmd, IID_IBOOLDATA);
// ipTextModel - >this is an interface <ITextModel>
InterfacePtr<IItemLockData> ipTextLockData(ipTextModel, UseDefaultIID());
if(ipTextLockData == nil)
{
break;
}
// set the command data
if (ipTextLockData->GetInsertLock()) {
ipLockData->Set(kFalse); // unlock
} else {
ipLockData->Set(kTrue); // lock
}
ipSetStoryLockStateCmd->SetItemList(UIDList(ipTextModel));
if (CmdUtils::ProcessCommand(ipSetStoryLockStateCmd) != kSuccess)
{
ASSERT_FAIL("SetStoryLockStateCmd failed");
break;
}
...
This works if the TextModel is in a text frame is not anchored. If the text frame is anchored the TextModel is never locked and the user can input some text.
- Is is possible to look anchored text frames?
- What is wrong?
- How can I lock the input in a text frame or text model?
Thanks for an answer.
Hans
Technical Details
Message-ID:
<59b8622a.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newshub.sdsu.edu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f63e9,edbe86f910e7290f,start X-Google-Attributes: gidf63e9,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Hans Stoessel" <hstoessel.list@pm-medici.ch> Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.indesign.sdk Subject: CS3 / Win: Lock an anchored text frame Message-ID: <59b8622a.-1@webcrossing.la2eafNXanI> Date: Mon, 23 Mar 2009 08:31:29 -0700 Lines: 42 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit