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
close icon

Edit Symbols Using Symbol Designer

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.

1 Reply

ER Eric Robishaw March 17, 2006 04:43 PM UTC

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); }

Loader.
Live Chat Icon For mobile
Up arrow icon