Refresh after move by code

If blocks are moved or rotated by code, the diagram scrollbars and range of motion of a DiagramNavigator are not updated until the user clicks on the diagram.Is there a way to force this refresh in code? 

Can you please provide a project with the specific situation that reproduces the issue? We can reproduce it here.

But in any case you can try to simply call 

DiagramNavigator1.Repaint;

Repaint does not help.


I have made a modified version of the Layout demo. There are 2 buttons Add Block and Move Block. Press Add then Move to see a block moved partly off of the diagram. The Scroll bars do not show until after clicking the diagram and the red box in the navigator will show correctly but will not move until after the click. 

You can download the project from this link:

Thank you for the project. You can use 



atDiagram1.EndUpdate;

Wagner R. Landgraf2020-01-22 20:21:49

Thanks, that worked.