We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Dynamic Pallettes

Hi, 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. Thanks Jarrod Lloyd

5 Replies

AD Administrator Syncfusion Team September 24, 2004 06:12 AM

Hi Jarrod, 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. Regards Arun


JL Jarrod Lloyd September 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? Thanks Jarrod


AD Administrator Syncfusion Team September 28, 2004 10:26 AM

Hi Jarrod, 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; mys.AddLabel(mys.Name,BoxPosition.Center); } else if(evtArgs.Node.GetType() == typeof(MyOtherSymbol)) { MyOtherSymbol myos = (MyOtherSymbol)evtArgs.Node; myos.AddLabel(myos.Name,BoxPosition.Center); } } } Regards Arun


MB Meir Bezalel June 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: 5.1.0.51 (the last version)


MF Meera Fathima Syncfusion Team June 4, 2007 04:50 AM


Hello Mayer,

Since you have posted this same query in the http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=61849 forum post, could you please follow-up with that forum?

Thanks
Meera.

Loader.
Live Chat Icon For mobile
Up arrow icon