Toggle standard button hilite through a field

Ian McKnight iangmcknight at googlemail.com
Tue Aug 5 07:08:23 EDT 2008


Hi

I'm sure there's something simple that I'm missing here but I would
appreciate any help offered.

I have a field sitting on top of a button. When I click the field I
want the button to respond as if it itself were clicked.
The field / button combination are part of a group which is placed on
a number of cards.
The idea is that each card will have buttons in the same position but
with different labels.

The autohilite of the button is off, although it doesn't seem to make
a difference.

The locktext of the field is true.

I have the following script in the field script

-----
on mousedown
    toggleBtnHilite True
end mousedown

on mouseUp
    toggleBtnHilite False
end mouseUp

on mouseLeave
    mouseUp
end mouseLeave

command toggleBtnHilite pBol
    set the hilite of btn "button" to pBol
end toggleBtnHilite

----

This works as expected when I choose a button style of rectangle,
shadow, round rectangle ie the button hilite flashes on and then off.
However when using the standard style, any button label (name) 'moves'
but the button itself does not hilite so when I don't
show the name of the button (my preferred setting as the field will
contain any text) nothing appears to happen.

BTW when I click the standard button directly the hilite toggles as expected.

I'm using Rev Studio 2.9 in Win XP.

-- 
Regards

Ian

=======================
Ian McKnight

iangmcknight at googlemail.com
=======================



More information about the use-livecode mailing list