Announcement

Collapse
No announcement yet.

boxes joined by lines

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • boxes joined by lines

    I'm thinking about having some boxes (dialogs with frames) on a dialog and joining them with straight lines. The lines would join the boxes at sticky points, say one in each corner and one in the middle of each side. When a box is moved, any line joined to it would move too, but to the sticky point which would give the shortest line length, measured from its origin to any sticky point on the box that has moved.

    I know this type of application pretty well as a user, but have not attempted to develop anything like it, except for the "moving dialogs around" part.

    Given the ability to move boxes around on the main dialog, we "just" have to know that there are lines connecting the box to other boxes, which could come from an array of lines, each having a source and destination window handle. The "shortest line" algorithm would convert the "sticky points" coordinates to main dialog coordinates and calculate the length of each one, then draw the line on the main dialog between the appropriate sticky points.

    Initial line drawing would be by selecting a line drawing mode (or tool) and clicking in the vicinity of a sticky point to plant each end of the line.

    Any suggestions would be welcome, particularly on how to draw the sticky points so that they can appear to be dragged with their "box".

    I feel a lot of screen flicker coming on...

  • #2
    It's coming on nicely, thanks, but it would be nice to put grab handles on a line so that it can be selected and deleted. Any ideas, etc...

    Comment


    • #3
      Jordi Valle recently posted demo code for "Arrows" & "Curved Arrows" w/drag boxes,.. it's similar concept you are looking for.
      Best regards
      Jules
      www.rpmarchildon.com

      Comment


      • #4
        Originally posted by Jules Marchildon View Post
        Jordi Valle ...
        very nice too. Not similar enough to borrow but I'm well on the way now - thanks!
        Attached Files
        Last edited by Chris Holbrook; 10 Aug 2008, 08:46 PM.

        Comment

        Working...
        X