Topic
5 replies Latest Post - ‏2008-07-31T01:39:14Z by SystemAdmin
SystemAdmin
SystemAdmin
665 Posts
ACCEPTED ANSWER

Pinned topic Child- Parent relationship

‏2008-07-30T03:58:15Z |

[azita said:]

Suppose I have defined a couple of Graphical Objects called NE and port. How can I define a parent-child relationship between these two items such that I can add port to the NE and remove it easily?
Updated on 2008-07-31T01:39:14Z at 2008-07-31T01:39:14Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    665 Posts
    ACCEPTED ANSWER

    Re: Child- Parent relationship

    ‏2008-07-30T16:11:43Z  in response to SystemAdmin

    [Eric said:]

    Hello,

    What will be the graphical representation of this relationship? Do you want the child to be contained in the bounds of the parent (like in a Canvas)? If yes, do you want the parent to enforce the layout of its children, or do you want the children to placed freely in the parent?

        Eric
    • SystemAdmin
      SystemAdmin
      665 Posts
      ACCEPTED ANSWER

      Re: Child- Parent relationship

      ‏2008-07-30T22:18:15Z  in response to SystemAdmin

      [azita said:]

      Both of them. Some of the children must be placed at the boundary and some of them must be placed inside the first object. JTGO has this capability, as soon as you define a child-parent relationship it places the child in the parent.

      • SystemAdmin
        SystemAdmin
        665 Posts
        ACCEPTED ANSWER

        Re: Child- Parent relationship

        ‏2008-07-31T00:11:09Z  in response to SystemAdmin

        [Eric said:]

        OK, to summarize, if I understand correctly, you want to define a custom UserSymbol that acts as a container, such that you can add children to it like a basic Canvas for example. Is that right? (If yes, I will post an article in the ILOG .NET blog to explain how to do this.)

            Eric
        • SystemAdmin
          SystemAdmin
          665 Posts
          ACCEPTED ANSWER

          Re: Child- Parent relationship

          ‏2008-07-31T00:30:38Z  in response to SystemAdmin

          [azita said:]

          yes, this is exactly what I want to do. I also want to able to add and remove children to/from the parent. For example I want to define a "Card" object as the parent and "Port" as the child.  I will have a couple of buttons called "Add port" and "remove port", when I click on "Add port" I want a "port" object to be added to the "card". I'd like to be able to select the children seperately so I can click on the "remove port" and remove the objects.

          thanks
          • SystemAdmin
            SystemAdmin
            665 Posts
            ACCEPTED ANSWER

            Re: Child- Parent relationship

            ‏2008-07-31T01:39:14Z  in response to SystemAdmin

            [Eric said:]

            OK, look at this post: http://blogs.ilog.com/netvisu/2008/07/30/how-to-create-a-user-symbol-that-acts-as-a-container/

                Eric