Article View: adobe.indesign.sdk
Article #43Re: CS3 / Win: Lock text for input
From: toan.nguyen
Date: Wed, 07 Nov 2012 08:29
Date: Wed, 07 Nov 2012 08:29
30 lines
2181 bytes
2181 bytes
On Friday, March 20, 2009 11:29:28 PM UTC+7, hstoess...@pm-medici.ch wrote:
> Hi
>
> Is it possible to lock parts of a text for user input? I can lock the whole text box, but not a part of it.
>
> Can I do that?
>
> Thanks
> Hans
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;
}
Technical Details
Message-ID:
<f226097d-64d1-49a9-8908-0fb3e7ce34b1@googlegroups.com>Path:
arc1-ca.pugleaf.net!gf5ni18188417qab.0!nntp.google.com!c7no9736782qap.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mailReferences:
<59b85c6f.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: 79d0882076,9111816a42f5c821
X-Google-Attributes: gid79d0882076,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Received: by 10.224.205.65 with SMTP id fp1mr2706262qab.4.1352276979024;
Wed, 07 Nov 2012 00:29:39 -0800 (PST)
Received: by 10.236.79.7 with SMTP id h7mr584426yhe.2.1352276978946; Wed, 07
Nov 2012 00:29:38 -0800 (PST)
Path: arc1-ca.pugleaf.net!gf5ni18188417qab.0!nntp.google.com!c7no9736782qap.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: adobe.indesign.sdk
Date: Wed, 7 Nov 2012 00:29:38 -0800 (PST)
In-Reply-To: <59b85c6f.-1@webcrossing.la2eafNXanI>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=115.78.162.164;
posting-account=pLTGyAoAAABRLPE1Bg6hkGj-FvJacamN
NNTP-Posting-Host: 115.78.162.164
References: <59b85c6f.-1@webcrossing.la2eafNXanI>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f226097d-64d1-49a9-8908-0fb3e7ce34b1@googlegroups.com>
Subject: Re: CS3 / Win: Lock text for input
From: toan.nguyen@audiencemedia.com
Injection-Date: Wed, 07 Nov 2012 08:29:39 +0000
Content-Type: text/plain; charset=ISO-8859-1