Kresten, I think I understand. The card script below will create n button and n * (n-1) connecting lines.
As the buttons are moved the connecting lines follow. Jim Hurley local myNAME, n on mouseDown put the short name of the target into myName put 5 into n repeat with i = 1 to n put "radio"& i into tName if there is no button tName then create button tName set the style of button tName to "radioButton" set the width of button tName to 20 set the loc of button tName to 20 + i*40,20 set the borderWidth of button tName to 0 end if end repeat repeat with i = 1 to n repeat with j = i+1 to n put "line" & i & j into tName if there is no grc tName then create grc tName set the style of grc tName to "line" set the layer of grc tName to bottom end if end repeat end repeat end mouseDown on mouseMove x,y if myName is "" then exit mouseMove if not (myName contains "radio") then exit mouseMove set the loc of button myName to x,y repeat with i = 1 to n put "radio" & i into tStart repeat with j = i+1 to n put "radio" & j into tEnd put "line" & i & j into tName set the points of grc tName to the loc of button tStart & cr & the loc of button tEnd end repeat end repeat end mouseMove On mouseUp put "" into myName end mouseUp on MouseLeave put "" into myName end MouseLeave > ------------------------------ > > Message: 6 > Date: Mon, 31 Oct 2011 15:38:03 +0100 > From: Kresten Bjerg <kresten.bj...@psy.ku.dk> > To: "use-livecode@lists.runrev.com" <use-livecode@lists.runrev.com> > Subject: handler to connect buttons with a line > Message-ID: > <8962f0e4bd055148aa4051d91f7eb4a908f13c6...@ibtmail2a.ibt.ku.dk.ad> > Content-Type: text/plain; charset="us-ascii" > > Hello > I have been experimenting to create a handler (as button or menu), which will > permit user > > a) To select two existing moveable button > > b) Create a line, attaching its endpoints to the buttons, so line will > stay between them wherever they are positioned on the card. > > c) It is important that same button can be connected to more buttons, > thus creating a simple user-built and editable mindmap. > My experiments - I am lousy as a programmer - have been of no avail. > Could somebody help, and sketch a handler ? > The context is that of extending the functionalities of a freeware > patient/citizen diary www.phenomenalog.dk<http://www.phenomenalog.dk> > Best regards > Kresten Bjerg kresten.bj...@psy.ku.dk<mailto:kresten.bj...@psy.ku.dk> > _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode