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.

Hiding the actual paint action until all items are painted

Thread ID:

Created:

Updated:

Platform:

Replies:

55609 Feb 1,2007 10:43 AM Feb 6,2007 08:27 AM Windows Forms 1
loading
Tags: Diagram
Hanne
Asked On February 1, 2007 10:43 AM

How can I make sure the painting of e.g. symbols on the view will not be shown until all symbols are painted? I build the diagram dynamically meaning the user can interact with a specific symbol by clicking on it and one or more child symbols will appear. (more or less like the expander sample in the sample browser)

Now (with the DirectedTreeLayoutManager) the child symbol will appear in the left corner of the the model. It will stay there until the link is created and a connection with the parent symbol is established. Then the child node is set to its correct location e.g. when the rotation degree is 0, beneath the parent symbol.
How can I avoid that the user will see all these actions? I just want to show the result, the child symbol(s) nicely positioned beneath the parent symbol.

Are there any other paint performance tips that can be helpful when building a diagram with several symbols?

Thanks in advance. Let me know if you have any questions regarding the situation of the problem.

Kind regards

Hanne

Hanne
Replied On February 6, 2007 08:27 AM

I found the solution. I knew about this method but I forgot about it:

* MyDiagram.Model.BeginUpdate();
Disables any redrawing of the Model until the following line is executed:

* MyDiagram.Model.EndUpdate(bool);
Enables the redrawing of the Model. Set bool to true if the attached Views have to be redrawn.

Enjoy for those who might need it!

Kind regards

Hanne

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.

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.

;