propertyChanged message

Geoff Canyon gcanyon at
Sat Sep 3 03:37:29 EDT 2022

> what if I wanted to change the font settings again, but only for say,
labels, and only certain labels and not others?

There are multiple ways to do (something like) this in Navigator.

1. Navigator can display all the controls in a stack (show the card list,
select all the cards, right click and browse controls). Then Navigator can
filter those controls, either by simple text match against the displayed
strings (which can be the name, id, long name, long id, or other options)
or by test -- so you can match however you like, using the three characters
"tID" to represent the object being tested. For example,

word 1 of the long name of tID is "button" and the width of tID is 100

Would filter to just buttons 100 pixels wide. You can of course filter on
custom properties if you want to tag the controls.

Then whatever font or other property you want to set can be changed.

2. Navigator can search all the controls in a stack and its substacks (or
whatever cards, stacks etc. you right click), again using whatever test you
can come up with, and create bookmarks for all of the matching controls.
Then selecting those bookmarks, you can change whatever property you like.

I would say you can save those bookmarks for later reference, but I just
tested and that appears broken. I'll have to fix it.

3. Finally, you could select whatever controls you like and then apply a
command. The command can be whatever script you like.
Bookmarking/filtering/selecting only the controls you want would be best,
but you could also perform tests in the command -- e.g. if you were
applying the command to many types of controls, but wanted to ignore fields
with "label" in the name, you do something like:

if word 1 of the long name of tID is "field" and the short name of tID
contains "label" then next repeat
-- whatever font-setting code you like here.

That would be less efficient than identifying the controls yourself, but
probably faster if you include your time filtering and selecting. Commands
can be saved (I just checked, that works) but I don't think they can easily
be modified (they're saved as text, so there's definitely *some* way to do
it). It would be possible to have a command ask for the font -- you can
include something like:

if tIndex = 1 then
ask "what font" with empty; put it into tFont
end if
-- font setting code here

In any case let me know if you decide to use Navigator and need help.


More information about the use-livecode mailing list