Repaint GoTextNode


#1
Hi, I have a GoTextNode. I am changed the text of it. When I do, the change does not display until I click on the GoView. Is there a way to force a repaint or some other trick to make the text show up? Thanks,
Jake Pearson
Micro Analysis and Design

#2

Unless you have turned off updating in one manner or another, the updating should happen automatically.
The common ways of turning off updating are by setting GoObject.SuspendsUpdates or GoDocument.SuspendsUpdates to true, or by calling GoView.BeginUpdate(). Most people should never need to do any of these things.
Can you get it to fail in one of the sample applications?


#3

What is weird is that I use this same piece of code in another application, and it works fine. Both apps share the same dlls that hold the update code. Everything seems to be the same between the two applications. That is why I am looking for some kind of a repaint function.


#4

Do you have the problem if you move the node? What if you modify the text of some other kind of node?
If you really must use a blunt instrument, you can use GoView.UpdateView(), or maybe just Control.Invalidate().
But my rule is: if you can’t explain some behavior, it’s a bug that might bite you later. So I would suggest checking on the things I mentioned.


#5

Any action within the GoView control will cause the update to occur. So if I click on it or move a node, the text updates. I am updating the text of the node via code.
BTW, the blunt instrument seemed to work. I will use it sparingly.