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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Overflow error

Thread ID:

Created:

Updated:

Platform:

Replies:

14358 May 25,2004 06:20 PM UTC Dec 1,2004 01:49 PM UTC WinForms 5
loading
Tags: Diagram
Administrator [Syncfusion]
Asked On May 25, 2004 06:20 PM UTC

I am just trying to create a symbol and add it to a diagram and I get an overflow error. Isn''t there any simple examples of say adding two nodes and making one the root and one a child to a diagram programatically. I have try both the InsertNodesCmd and AppendChild.

Administrator [Syncfusion]
Replied On May 27, 2004 06:29 PM UTC

Hi Chuck a) Which version of Essential Diagram are you currently using? b) Have you taken a look at the DynamicSymbol sample that ships with Essential Diagram. In this sample refer to the MySymbol.cs file which demonstrates how you can create a custom symbol and programmatically add child nodes to it. Kindly post an update if you have any further questions. Regards Arun

Administrator [Syncfusion]
Replied On June 7, 2004 06:52 PM UTC

Hi, We very recently fixed a problem that was causing an overflow exception when trying to add symbols containing zero width/height shapes(horizontal/vertical line nodes). It''s possible that your problem is being caused by this error in the diagram code. If so, then the next update of Essential Diagram should take care of this issue for you. Regards, Prakash Syncfusion, Inc

James Brock
Replied On November 29, 2004 09:07 AM UTC

Hi Arun, I am using version 2.1.0.30 with VS.2003 and am attempting a rather basic task. I am creating a form which contains a Diagram component. In my Form_OnLoad event I "load a symbol" using the following code: private void LoadTheSymbol() { try { // create a symbol Symbol defSymbol = new Symbol(); defSymbol.Height = 100; defSymbol.Width = 100; defSymbol.X = 10; defSymbol.Y = 10; defSymbol.LineStyle.LineWidth = 1.1F; defSymbol.FillStyle.Color = Color.Red; // add a port AnchoredPort port = new AnchoredPort(defSymbol, BoxPosition.TopLeft); port.Load(PortVisuals.CirclePort); port.Visible = true; // add a label SymbolLabel lbl = new SymbolLabel(); lbl.Anchor = BoxPosition.BottomRight; lbl.Text = "Child"; defSymbol.Ports.Add(port); defSymbol.Labels.Add(lbl); // add child to model diagramSymbol.Model.AppendChild(defSymbol, diagramSymbol.Model.DefaultLayerName); diagramSymbol.View.Update(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } When I call diagramSymbol.View.Update() I get an overflow error. I have tried the following all to no avail: 1) Not calling View.Update(), instead the overflow error occurs in my form.ShowDialog() method. 2) Using InsertNodesCmd, overflow occurs when calling Controller.ExecuteCommand(myCmd) 3) Calling Diagram.Refresh(), again this then delays the "overflow" until later on. Am I doing something daft? Any thoughts appreciated. Thanks Jimski

Administrator [Syncfusion]
Replied On November 29, 2004 06:53 PM UTC

Hi Jimski I could not reproduce the problem using the 3.0 release candidate. Here is a sample where I pasted your code in the Form_Load and had no problems. Regards Arun

James Brock
Replied On December 1, 2004 01:49 PM UTC

Thanks Arun, works well.

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

;