Issue with Swim lanes


I have created two swim lanes as per nodelinkdemo example. I have somw queries on swim lanes.
1. I have implemented autlayout code to fit all nodes into godiagram. Now, I have added two swim lanes dynamically. it can more than 2. I want to add my nodes to these swim lanes.Suppose, I have 30 modes with 2- 3 lines text, will my swim lanes will grow or my all nodes will be fit in the swim lanes because of godocument layout functions.
2. in this example, we are giving node position as below. lane1node1.Position = new PointF(lane.Left + 150, lane.Top + 10);
I tried without this line then, it was going outside the swim lanes. Is it possible that without doing node position we can add them into lane.
3. Before swim lanes, I implemented node double click functionalty to change node color of full path. For this, i used GoObject "TopLevelObject" to get current node object. After implemeting swim lines, its giving swiming pool object.Logically, It is true because now swiming pool is top level object. Now, How i can get node object. How I can identify, this object is related to whicg swim lanes.
Please suggest me.

If you play with layout in SubGraphApp, you’ll see those subgraphs will resize around the objects as the layout runs.

SwimLanes uses GoSubGraphBase, but it is a fixed-sized, user-resizable subgraph.

Which AutoLayout are you using? I’d have to go try it, I’ve never done a Layout inside the SwimLanes sample class.

2. no.

3. Just do obj= obj.Parent until type(obj) is your node class. (see FindCollapsingRecordNode in CollapsingRecordNode in NodeLinkDemo).

  1. it’s easier than that. Use obj.ParentNode;