Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!apple!bionet!ig!agate!helios.ee.lbl.gov!nosc!marlin!bwalker
From: bwalker@marlin.NOSC.MIL (Beth Walker)
Newsgroups: comp.sys.mac.hypercard
Subject: Re: Fast way to create a button?
Message-ID: <1080@marlin.NOSC.MIL>
Date: 21 Sep 88 19:59:37 GMT
References: <3060@pt.cs.cmu.edu>
Reply-To: bwalker@marlin.nosc.mil.UUCP (Beth Walker)
Distribution: na
Organization: Naval Ocean Systems Center, San Diego
Lines: 30


>I have a stack in which I would like to automatically create a card button
>on each new card (and no, a background button is not a better solution;
>details on request).  

In spite of this, I do have a method using a background button.  My problem 
was that I wanted a button on each new card to be used as a check box.  Just 
creating a checkbox button in the background resulted in the check showing up 
on all cards in the stack, regardless of which card the button was clicked on.

My solution was to create a button and field pair in the background.  The 
field is set to its smallest size by dragging, and the font is set to Geneva 
10 pitch, bold.  The field was named according to its function -- PAID, etc.  
I then create a transparent button, also in the background, and place it over 
the field.  The script of the button is as follows:

   get first word of bkgnd field "PAID"
   if it is empty then
      put "X" into it
   else
      put empty into it
   end if 
   put it into first word of bkgnd field "PAID"
 
I now have a button that will put an X into the field when it is clicked.  If 
the button is clicked again, the X is removed.  The button shows up on every 
new card, but the X only appears on those cards for which the button is 
clicked.

Now, if anyone knows of an easier way to do this....