use-revolution Digest, Vol 7, Issue 144

Cubist at aol.com Cubist at aol.com
Sat Apr 24 02:14:13 EDT 2004


In a message dated 4/23/04 8:21:35 PM, 
use-revolution-request at lists.runrev.com writes:

>
>------------------------------
>
>Message: 11
>Date: Fri, 23 Apr 2004 18:08:48 -0700
>From: Jim Hurley <jhurley at infostations.com>
>Subject: grouping
>To: use-revolution at lists.runrev.com
>Message-ID: <a05100300bcaf6cbbd65e@[69.19.172.181]>
>Content-Type: text/plain; charset="us-ascii" ; format="flowed"
>
>I'm trying to find a way to group a list of controls.
>
>I have tried the following:
>
>on mouseUP
>   put line 1 of Field 1 into results
>   --Line 1 of Field 1 is: graphic "graphicA" and graphic "graphicB"
>   group graphic "graphicA" and graphic "graphicB" -- This line works
>   group results --This line doesn't
>end mouseUP
>
>I can't find any way to do this without using the explicit form. (I 
>have a lot of controls and they are changeable; the explicit form is 
>not an option.)
>
>Any thoughts on how to group a list of controls?
   Off the top of my head, I can think of a couple possibilities:

  # Option one
  choose pointer tool
  drag from X1,Y1 to X2,Y2
  group

  # Option two
  choose pointer tool
  put "Click on each item you want to group; if it's the last item, 
shift-click"
  put "" into DeseWunz
  repeat
    repeat with K1 = 1 to the number of items
      wait until the mouseClick # I know, this is barbaric...
      put the shiftKey into Fred
      if the clickLoc is within the rect of item K1 then # line-wrap ho!
      put the name of item K1 into line (1 + the number of lines in # more 
line-wrap
      DeseWunz) of DeseWunz # end of overextended line
      exit repeat
    end repeat
    if Fred is "down" then exit repeat
  end repeat
  replace return with " and " in DeseWunz
  do ("group" && DeseWunz)

   Neither of these fragments have been tested; if they don't work, perhaps 
they'll help point you in the direction of a solution. Hope this helps...


More information about the use-livecode mailing list