Static sized port


#1

We have a node type which consists of, among other things, a resizable GoRoundedRectangle frame with a visible port at the midpoint of each side. We want the port size to remain static; however when we resize the frame, the ports change size. We can’t find a property to set to maintain the initial size. The samples which exhibit the desired behavior all seem to use Go ports for which we do not have source. How to do this, thanks!


#2

look at Demo1 in the samples, specificaly at PinNode I can Garuantee you that will work…


#3

You can control whether the children of a group are resized when the whole group is resized: set the GoObject.AutoRescales property to false.
The easiest way to get a node with a port at the midpoint of each side is to use GoTextNode. But you can certainly construct it yourself; I believe most (if not all) of the predefined node classes can be implemented easily using only public or protected methods and properties of GoObject, GoGroup, GoNode et al.


#4

GoNode (Which was used in PinNode) works well I think…