[comp.sys.mac.hypercard] Help With Buttons

Ken.Knight@f421.n109.z1.fidonet.org (Ken Knight) (01/09/91)

fsb@vitro.uucp (Steve Brailsford) writes:
>...In these text fields are
>all capitalized words, like WORD, and I want to make a button
>out of that word to get more info on that part of it.  I tried
>replacing the word part with blanks in the field, and putting
>a button with that word in its place.  But the button doesn't
>show up.  I think in 1.2 you can't have a button in a field.
>Is there a way to do it in 2.0?  Thanks for any help.
 
Your buttons are being obscured by the field itself. You can move them
up in the layers on the card by selecting them with the button tool and
using the Move Closer command in the Objects menu.
 
Keep in mind that in scrolling fields, or fields that you simply
resize, this scheme is not going to work any longer since the button
will have moved off the words it is supposed to be matched to. I'd
suggest instead you make use of the new Grouped Text style and the
ClickText function. So, in a field script you might do something like:
on mouseUp
 put the clickText into phrase
  if phrase is not empty then
    do whatever you want here
  end if
end mouseUp
 
Hope that helps. In version 1.2.x you'd do this in a silghtly different
manner using the selectedText function. This works well for single word
markers, to get multiple words is a totally different matter.


--  

        Ken Knight, Ken.Knight@f421.n109.z1.fidonet.org
      via The Black Cat's Shack's FidoNet<->Usenet Gateway
          blkcat.fidonet.org   and   Fidonet 1:109/401