Are there any arrow buttons?
Dave Cragg
dcragg at lacscentre.co.uk
Mon Oct 30 09:29:26 EST 2006
On 30 Oct 2006, at 13:33, Bill Marriott wrote:
> No, the answer is simply to group the button (along with any other
> persistent element in your UI) and set the group to "Behave like a
> Background" in the object inspector.
At the risk of confusing James even more, I don't think it's
necessary to set the group to "Behave like a Background". Just
"placing" the group on each card is sufficient to get the same button
on each card as a shared object.
When you set the group to "Behave like a Background" (set the
backgroundBehavior to true), you change the message passing path.
This can be useful, but can also have unwanted effects. (unlikely in
this case).
To illustrate:
Using James' example button, say you want to set the script to this:
on mouseUp
go next card
end mouseUp
But instead of putting the handler in the button script, you put it
in the group's script. (Perhaps unlikely in this case, but something
you might do if you were grouping a set of buttons.) With the
backgroundBehavior set to false, the behavior will be exctly the same
as if the handler were in the button's script. But if you set the
backgroundBehavior to true, clicking anywhere on the card will
trigger the handler, which may not be what you want.
Cheers
Dave
More information about the use-livecode
mailing list