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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dynamic Pallettes

Thread ID:

Created:

Updated:

Platform:

Replies:

19350 Sep 24,2004 03:14 AM UTC Jun 4,2007 09:50 AM UTC Windows Forms 5
loading
Tags: Diagram
Jarrod Lloyd
Asked On September 24, 2004 03:14 AM UTC

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

Administrator [Syncfusion]
Replied On September 24, 2004 11:12 AM UTC

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

Jarrod Lloyd
Replied On September 26, 2004 10:05 PM UTC

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

Administrator [Syncfusion]
Replied On September 28, 2004 03:26 PM UTC

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

Meir Bezalel
Replied On June 4, 2007 06:45 AM UTC

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)

Meera Fathima [Syncfusion]
Replied On June 4, 2007 09:50 AM UTC


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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;