I was wondering if you can make a dynamic pallette. I have a program that has a list of elements, and what I would like to do is dynamically change my pallette so that the symbols available match my list of items. I would want to base each symbol on an existing symbol.
To make it clearer, I have a treeview of named devices, and I would like to bring up the view with the pallette containing these named devices (they would all have the same shape etc...).
I think I can do it by modifying the edp file in realtime, but this is a hack solution. Does anyone know a better way.
ADAdministrator Syncfusion Team September 24, 2004 06:12 AM
Here is a sample that demonstrates how you can programmatically create Palette(s) and use the PalleteGroupBar/PalleteGroupView in Essential Diagram. The main points of this sample are:
- There are 2 custom symbols: MySymbol and MyOtherSymbol (refer to the MySymbol.cs file).
- There are 2 SymbolPalettes: mypalette and myotherpalette.
- Symbols are programmatically added to the palettes
- The palettes are added to the Pallettegroupbar
- Users can drag and drop symbols from the Pallettegroupbar to the Diagram
Hope this gives you an idea to implement what you are seeking.
JLJarrod LloydSeptember 26, 2004 05:05 PM
Thanks, that worked well.
One note for VC++ developers, remember to have your PlugInClass in the format "MyDll.MyClass", not "MyDll::MyClass".
One more question, I don''t want to have a seperate model for all my elements - Is it possible to change the label that is generated depending upon which symbol is selected in the PalletteGroupBar?
ADAdministrator Syncfusion Team September 28, 2004 10:26 AM
You can do what you are seeking in the Model''s ChildrenChanging event as demonstrated by the following code snippet:
private void diagram1_Model_ChildrenChanging(object sender, Syncfusion.Windows.Forms.Diagram.NodeCollection.EventArgs evtArgs)
if (evtArgs.ChangeType.ToString() == "Insert")
if (evtArgs.Node.GetType() == typeof(MySymbol))
MySymbol mys = (MySymbol)evtArgs.Node;
else if(evtArgs.Node.GetType() == typeof(MyOtherSymbol))
MyOtherSymbol myos = (MyOtherSymbol)evtArgs.Node;
MBMeir BezalelJune 4, 2007 01:45 AM
Hello, I'm a new developer using Syncfusion. What I'm looking for is a VB.net sample for drag and drop symbols from and to a symbol pallete. I would like to let my users to pick the symbol from a palette, to change it somehow and add the updated as a new symbol by drag and drop only. I would appreciate any help. Mayer
VS.net = Visual Studio 2005 Product: 22.214.171.124 (the last version)
MFMeera Fathima Syncfusion Team June 4, 2007 04:50 AM