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.

Edit Symbols Using Symbol Designer

Thread ID:





42048 Mar 17,2006 11:33 AM Mar 17,2006 11:43 AM Windows Forms 1
Tags: Diagram
Eric Robishaw
Asked On March 17, 2006 11:33 AM

In Symbol Designer: If I create a symbol pallete, add some symbols and save it, close symbol designer, and run it again. Open the saved symbols. Then try to edit one of the previously saved symbols: The Property Editor will no longer show the attributes of anything except the symbol itself. I.e., if I click on a rectangle IN the symbol, the Property Editor still shows only the properties for the symbol the rectangle is contained inside. NOW... If I add a new symbol, and add a rectangle to the new symbol, then I can edit the attributes of the rectangle. HOWEVER, I still cannot edit the attributes of any of the previously saved symbols. Is this annoying behavior by design? Or a simple bug? Looking at the code, I can see that when a Symbol is edited (double-clicked, the symbolPaletteGroupBar_SymbolModleDoubleClick() event loads the symbol, and the last thing it does is set propertyEditor.Diagram = formSymbolDoc.Diagram (which is the newly loaded symbol''s diagram window). The code looks right. What would keep the objects from being displayed in the PropertyEditor once the Symbol has been saved? NOTE: There is a context menu in the SYmbolDocument window, that includes "Properties" however, no event is connected to the click of this menu item.

Eric Robishaw
Replied On March 17, 2006 11:43 AM

Found the bug. Fixed it. The PropertyEditor''s Diagram is not being updated when the Model changes, in symbolPalletteGroupBar_SymbolModelSelected(); Here''s the updated code for those that have the code available. For those that don''t, hopefully, Syncfusion will get you an updated version. Otherwise, the Symbol designer is pretty useless, for updated existing symbols. NEW CODE, goes into MainForm.cs private void symbolPaletteGroupBar_SymbolModelSelected(object sender, Syncfusion.Windows.Forms.Diagram.Controls.SymbolModelEventArgs evtArgs) { IEnumerator enumMdiChildren = tabbedMDIManager.MdiChildren.GetEnumerator(); SymbolModel selectedModel = evtArgs.Model; SymbolDocument selectedDocument = null; while (enumMdiChildren.MoveNext()) { SymbolDocument curMdiChild = enumMdiChildren.Current as SymbolDocument; if (curMdiChild != null) { if (curMdiChild.Model == selectedModel) { curMdiChild.BringToFront(); selectedDocument = curMdiChild; break; } } } if (selectedDocument != null) this.propertyEditor.Diagram = selectedDocument.Diagram; this.propertyEditor.SetSelectedObject(selectedModel); }


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.

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.