2 GoCollapsibleHandels

Hello all,
I've searched through this forum to see if anyone else has done the following:
I want to add 2 GoCollapsibleHandels to a GoMultiTextNode, one at the top left and another at the opposite side. Clicking on the appropriate CollapsibleHandel will show/or hide more nodes connecting to that side of the current node (I'll override the CollapsibleHandel's OnSignleClick event to add/remove additional nodes to the graph). However, the behavior I'm getting now is that both CollapsibleHandels would expand/collapse together.
Thanks in advance for hints or VB sample code of how to do this.

IGoCollapsible as a concept only supports 1 definition of “collapse” per node. (Not quite true actually: ClassDiagramNode uses collapsing within the node, but at different levels of heirarchy within the node.)

Maybe the easiest thing to do is wrap the in a simple GoGroup class that simply implements IGoCollapsible and knows whether it's the left or right side, and calls the parent node to do the appropriate left/right collapse.


Thanks for the respond and suggestion. Henry

I threw something together for you, based on MultiTextNode.

It doesn't actually do the collapsing, but the structure is roughed in for 2 (or more) collapsible handles on a node.
I'll email you a copy of the file too, but here it is:
* Copyright © Northwoods Software Corporation, 1998-2008. All Rights
* Reserved.
* Restricted Rights: Use, duplication, or disclosure by the U.S.
* Government is subject to restrictions as set forth in subparagraph
* (c) (1) (ii) of DFARS 252.227-7013, or in FAR 52.227-19, or in FAR
* 52.227-14 Alt. III, as applicable.
using System;
using System.Drawing;
using Northwoods.Go;
namespace Node_Link_Demo {
public class MultiTextNodeDualCollapse : GoMultiTextNode {
public MultiTextNodeDualCollapse() {
this.ListGroup.LinePen = Pens.Gray;
this.ListGroup.BorderPen = Pens.Gray;
this.ListGroup.BrushColor = Color.Azure;
CollapsibleHandleSpot h = new CollapsibleHandleSpot();
h.Name = "left";
h.Position = this.Position;
myLeftHandle = h;
h = new CollapsibleHandleSpot();
h.Name = "right";
h.Handle.BrushColor = Color.Red;
h.SetSpotLocation(TopRight, this, TopRight);
myRightHandle = h;

protected override void CopyChildren(GoGroup newgroup, GoCopyDictionary env) {
base.CopyChildren(newgroup, env);
MultiTextNodeDualCollapse newobj = (MultiTextNodeDualCollapse)newgroup;
newobj.myLeftHandle = (CollapsibleHandleSpot)env[myLeftHandle];
newobj.myRightHandle = (CollapsibleHandleSpot)env[myRightHandle];
public override void LayoutChildren(GoObject childchanged) {
GoObject lhandle = this.myLeftHandle;
if (lhandle != null) {
lhandle.SetSpotLocation(TopLeft, this, TopLeft);
GoObject handle = this.myRightHandle;
if (handle != null) {
handle.SetSpotLocation(TopRight, this, TopRight);
public void Collapse(string which)
// fill in.
public void Expand(string which)
// fill in
public bool IsExpanded(string which)
return true; // fill in
private CollapsibleHandleSpot myLeftHandle = null;
private CollapsibleHandleSpot myRightHandle = null;
public class CollapsibleHandleSpot : GoGroup, IGoCollapsible {
public CollapsibleHandleSpot ()
GoCollapsibleHandle h = new GoCollapsibleHandle();
public string Name {
get { return this.FindName(Handle); }
set { this.AddChildName(value, Handle); }
public GoCollapsibleHandle Handle
get {return (GoCollapsibleHandle)this[0];}
//IGoCollapsible Members
public void Collapse() {
MultiTextNodeDualCollapse node = this.Parent as MultiTextNodeDualCollapse;
if (node == null) return;
public bool Collapsible {
get {
return true;
set {
public void Expand() {
MultiTextNodeDualCollapse node = this.Parent as MultiTextNodeDualCollapse;
if (node == null) return;
public bool IsExpanded {
get {
MultiTextNodeDualCollapse node = this.Parent as MultiTextNodeDualCollapse;
if (node == null) return false;
return node.IsExpanded(this.Name);
// end IGoCollapsible

Thanks Jake.

I converted your codes to VB .Net to be used in my program.
After several clicks on different GoCollapsibleHandles within the GoMultiTextNode, the view’s ObjectSingleClicked event recognized these GoCollapsibleHandles as GoTexts. Do you have any idea of what's happening?
Henry<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

No. I’m not even sure what you mean by “recognized as GoTexts”. What are you seeing that makes you think that?

I figured out my problem. I found that the view’s AutoPostBack was set to False. This causes the nodes to be resized after the view has been resized by our program. So when I click on the collapsible handel, the view’s ObjectSingleClicked reports the selected object as GoText (I have several GoText object within this special node which inherits the GoMultiTextNode).