Drawing Bug?

I seem to be finding some strange happenings with GoExpress 2.6.1 and am wondering if there is a workaround for it.

There are a number of changes that can be made within our software, which requires a complete re-creation of the diagram. Upon doing this, the results vary.

Sometimes things draw correctly in the form like below:


| |
| GI GI Text |

This represents a Text Node with two GoImages placed over the top of it. However we have found that at other times the following happens:

  • Lots of nodes are drawn briefly in the top left corner.
  • Nodes are then repositioned and appear in the correct place.
  • Nodes are however missing their GoImages.

We have code in to control the positioning, layer changing and visibility of these GoImages and I’ve checked the following which I don’t think are at fault:

Bounds of GoImage
Size of GoImage
Layer containing GoImage
Z-order of GoImage
Visible property of GoImage
Bitmap date of GoImage is correct
No Exceptions being thrown by GoExpress.

When this problem occurs, I have found that simply changing the bounds of the GoView by changing the doc-scale or adjusting it’s size displays all the GoImages correctly.

Unfortunately this isn’t a very nice solution to the problem, asking the user to zoom in a notch then back out. It seems impossible to determine when the problem manifests itself at runtime through the code, and I have tried manual changes refreshes of the GoView at run-time however I believe these are occuring while the drawing thread is still executing (even using the Invalidated event) and hence they don’t seem to do anything.

If you have any suggestions on how I can get around this problem they’d be much appreciated.

You have classes that override Paint()?

Jake,

I’m not override Paint() on any of my classes no…

Make sure nothing is happening on threads. Check any LayoutChildren overrides. With Express, there’s no way to add images to Nodes, so exactly how you’re adding images to GoText isn’t obvious.