Hi
We have recently downloaded GoWin
4.1.0.4 for .NET 4.0 Windows Forms and
started a test project for creating class diagram. We browsed your
samples and NodeLinkDemo.CollapsingRecordNode( vb.net) was interesting.
We have some questions in this regard:
1.How can we add a method to this class to return currently selected CollapsingRecordNodeItem/s?
2.When mouse goes over CollapsingRecordNodeItem its port handles should be visible.3.How can we find out that a link has been created between two NodeItems and identify From/To Nodes?
4.How can we find out currently selected CollapsibleRecordNode/s in GoView?
5.How can we add a CheckBox to each CollapsingRecordNodeItem?
4.How can we find out currently selected CollapsibleRecordNode/s in GoView?
see 1.
5.How can we add a CheckBox to each CollapsingRecordNodeItem?
Just duplicate what CollapsingRecordNodeItem does to add the icon. In fact, you probably want to just add another icon (one checked, one unchecked) and handle the clicks to change state. You don’t want to really use a CheckBox Control.
I’ve tried to copy& paste GoImage image.but it can’t show GoView’s Image.How I can specify an image for GoImage?
2.we implemented OnMouseOver, is there any OnMouseOut event or something similar?
Sorry… I don’t understand what you’re asking. All the code is there for one image, just duplicate that and change “Image” or “Icon” to “checkbox” as appropriate. The Image is loaded in “Init”. You probably don’t need to be able to specify the image names for the checkbox externally, but you do need to be able to set/get the “checked” state, which chooses the appropriate image.
2. Flowcharter does this in GoView.OnBackgroundHover.
But it showes just this icon.I want to show two icons in the right and two in the left(eg: show primery key, not null,…)
2.How I can let end user to reorder CollapsingRecordNodeItem ? for example move one to first position in the list.can I let end user do it with
drag & drop?
It’s a little more involved than I led you to believe earlier.
CollapsingRecordNodeItem is coded assuming there is only the 1 collapsing handle and/or 1 image in the Item. So… adding images would really mean generalizing the image handle code there to handle more than one.
The Image property, is just the first GoImage typed object in the GoTextNode (CollapsingRecordNodeItem is derived from GoTextNode).
So… you’d have to change
1. Init to allow passing in more than 1 imgname
2. Change CalcIconSpace to return the width of the images to the left of the label (this sets the TopLeftMargin.Width of the label so there is room for the images)
3. Change LayoutChildren to position each of the images, relative to the Label.
Now… if you can do this without adding references like _theGoImage2, that simplifies other bits.
Do you always have 2 icons on the left and 2 on the right, or does it vary per Item?
Hi Jake
Thanks Jake! For the drag & drop it worked really great! Yes , It will always have two icons on the right and two on the left.To change the code seems to be error-prone because there is no graphical picture that shows what is space,margins,handle, … and what this methods do? Can you please provide a code snippet in this regard?