Hi,
Awesome product, but I’ve got a real winner of a question. I would like to essentially create a windows user control and “embed” it within a node. My goal is to have access to windows control functionality as well as the inherent capabilities of a node. For example, I would like to create a small user control with several buttons on it. I then want to have several ports. This user control I would like to use as a node and “connect” it to other similar nodes by creating edges between the ports. In trolling through your documentation, I believe that inheriting from the GoObject class is the way to go.
Is what I am trying to do within the capabilities of GoDiagram.Net? And if so, am I on the right track?
Basically, you just need to use the GoControl class. GoControl inherits from GoObject, so it has all the properties that any GoObject has but has the “appearance” of a WinForms Control.
Here are a few examples that make use of GoControl:
ControlGroup.cs demonstrates how to provide a “border” around a Control by having a GoRectangle be slightly larger than the GoControl, both GoObjects being children of a group. ControlGroup.cs (1.8 KB)
PropertyGridNode.cs does something similar, but it assumes the Control to be shown is a PropertyGrid. Initially the PropertyGrid is showing the properties of the PropertyGridNode itself. PropertyGridNode.cs (4.4 KB)
BrowserBalloon.cs inherits from GoBalloon to show a WebBrowser control instead of a plain GoText label. (The WebBrowser control is new in .NET 2.0.) The following screenshot shows our home page inside the balloon. BrowserBalloon.cs (2.7 KB)
I tried to use this example in my code in different scenario, say, when user hover a node the program will popup this BrowserBalloon. Something like this: