Best way to check if a Field is a label?

Peter W A Wood peterwawood at
Wed Jul 8 06:27:08 EDT 2015

Thanks, Hugh

I’m trying to find the best way to clear all the fields in which data can be entered on a card. At the moment I use this code:

repeat with y = 1 to the number of fields of this card
    if not the lockText of Field y then
      put empty into Field y
    end if
  end repeat

It works for my simple program but using a customProperty would be safer.



> On 8 Jul 2015, at 18:09, <admin at> wrote:
> Hi Peter
> As you will have gathered, there is no "label" property as such, simply a
> field with pre-defined attributes including lockText. It depends what you
> are trying to do and why you need to identify them, but if you need to
> regularly test the easiest way may be to manually specify a customProperty
> for each label field so that...
> If the cLabelStyle of the target = true then [etc]
> Best regards
> Hugh Senior
> FLCo
>> -----Original Message-----
>> At the moment I?m checking the lockText property to distinguish a Label
>> Field. Is there a better or more reliable way?
>> Regards
>> Peter
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the Use-livecode mailing list