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

symbol name

Hi, I use symbol designer to create palette with 3 symbols, and then I load it into mainform in design time. I can drag and drop and link three symbols when program is running. What I want to do is to invoke a dialog box when right-clicking or double-clicking the symbol. However I couldn''t find a way to determine Symbol''name in the code. If using evtArgs.Node.Name.ToString() to get name, it shows always "symbol", if adding more symbols, names will be "symbol1","symbol2".... How can I access the specific symbols in a diagram? rgs, Chris

5 Replies

AD Administrator Syncfusion Team September 17, 2004 12:48 PM UTC

Hi Chris Here is a sample where you can add Custom Symbol (MySymbol) to the Diagram. Hovering on the custom symbol will display Tooltips with the Symbol''s name (MySymbol, MySymbo1...). Can you take a look at this sample and update this posting if you have any further questions. Regards Arun


LL ll September 19, 2004 06:47 PM UTC

Hi Arun, Thanks. I still have problem for symbol name. I use Symbol Designer to design some symbols and drop it into diagram (MDI application) and use Tooltip to check the name. a, If I group symbols in symbol desginer, I cannot move symbol in diagram after dropping. If ungroupping in desginer, then it works. ? b) Tooltip show different name depending in mouse position. if symbol includes one rect, one ellipse, one lable, the tooltip will show name as Rect, Ellipse, or Lable name, depending on where it mouse stays on the symbol. Chris >Hi Chris > >Here is a sample where you can add Custom Symbol (MySymbol) to the Diagram. Hovering on the custom symbol will display Tooltips with the Symbol''s name (MySymbol, MySymbo1...). > >Can you take a look at this sample and update this posting if you have any further questions. > >Regards >Arun


LL ll September 19, 2004 11:15 PM UTC

Arun, Ok now. I have to use gettype() before getting name. Please give a example to add ports in code. Thanks, Chris >Hi Arun, >Thanks. > >I still have problem for symbol name. I use Symbol Designer to design some symbols and drop it into diagram (MDI application) and use Tooltip to check the name. > >a, If I group symbols in symbol desginer, I cannot move symbol in diagram after dropping. >If ungroupping in desginer, then it works. ? > >b) Tooltip show different name depending in mouse position. if symbol includes one rect, one ellipse, one lable, the tooltip will show name as Rect, Ellipse, or Lable name, depending on where it mouse stays on the symbol. > >Chris >>Hi Chris >> >>Here is a sample where you can add Custom Symbol (MySymbol) to the Diagram. Hovering on the custom symbol will display Tooltips with the Symbol''s name (MySymbol, MySymbo1...). >> >>Can you take a look at this sample and update this posting if you have any further questions. >> >>Regards >>Arun


AD Administrator Syncfusion Team September 20, 2004 12:58 PM UTC

Hi Chris, 1. Thanks for the update. 2. The following code snippet shows how you can add ports to MySymbol. private CirclePort leftport; private CirclePort rightport; //Add these lines to MySymbol''s Constructor //Port locations leftport = new CirclePort(new PointF(0, this.Height / 2)); rightport = new CirclePort(new PointF(this.Width, this.Height / 2)); //Append CirlePorts to MySymbol AppendChild(leftport); AppendChild(rightport); //Make CenterPort visible this.CenterPort.Visible = true; Regards Arun


LL ll September 20, 2004 01:13 PM UTC

Thanks, Arun, Works perfectly!! Chris >Hi Chris, > >1. Thanks for the update. > >2. The following code snippet shows how you can add ports to MySymbol. > >private CirclePort leftport; >private CirclePort rightport; > >//Add these lines to MySymbol''s Constructor > >//Port locations >leftport = new CirclePort(new PointF(0, this.Height / 2)); >rightport = new CirclePort(new PointF(this.Width, this.Height / 2)); >//Append CirlePorts to MySymbol >AppendChild(leftport); >AppendChild(rightport); >//Make CenterPort visible >this.CenterPort.Visible = true; > >Regards >Arun >

Loader.
Live Chat Icon For mobile
Up arrow icon