Some questions

Hi
I want to show my manager a demo about NodeLinkDemo.CollapsingRecordNode( vb.net). My problems about it are:
1.How I can add an extra goimage(icon) to CollapsingRecordNodeItem? I want exactly two icons for each RecordNodeItem.
2.I’ve enabled its drag & drop.Is it possible to be notified when enduser drops an
CollapsingRecordNodeItem to a CollapsingRecordNode? if yes , how?
3.When I enable
CollapsingRecordNodeItem label edition, I want to show a single line texteditor but it shows a multi line editor.
4.I want to show a minitoolbar like Microsoft word’s when user hovers his mouse cursor over a
CollapsingRecordNodeItem.

Regards

1.How I can add an extra goimage(icon) to CollapsingRecordNodeItem? I want exactly two icons for each RecordNodeItem.



I covered that in this note



CollapsingRecordNodeItem what I call “tightly coded”… it’s very compact, but makes a bunch of simplifying assummptions. The way it is coded doesn’t lend itself to easily tossing in another Image.



Look at the way DecoratedTextNode (also in NodeLinkDemo) adds an image, with an explicit property myDecoration property. (Actually… ignore the whole bit about myDecoration being a GoGroup, that part is fancier than you need, just add myImage1 and myImage2. But look how the properties are handled and especially CopyChildren.)





2.I’ve enabled its drag & drop.Is it possible to be notified when enduser drops an CollapsingRecordNodeItem to a CollapsingRecordNode? if yes , how?



You should be getting a DocumentChanged event, with a LayerChanged hint and a subhint of GoGroup.RemovedObject followed by another one with a subhint of GoGroup.InsertedObject.





3.When I enable CollapsingRecordNodeItem label edition, I want to show a single line texteditor but it shows a multi line editor.



You can try setting Multiline=false on the GoText.





4.I want to show a minitoolbar like Microsoft word’s when user hovers his mouse cursor over a CollapsingRecordNodeItem.



You should be able to set up an OnHover override on the GoText object. (or the GoView’s ObjectHover event… that might be easier. IconicApp has a sample.)



For the top line, you should be able to use “IsHeader” to determine it is a header with images, and have LayoutChildren put the images on the right. Note you’ll have to manage the way Icon Space is managed along with TopLeftMargin.