Dear all,
This prblem is bothering me quite some time now... I have a Panel with
a custom panels on top of iet on top of it. Now I need do perform some
updates on all of the (15+). Understandably, all the small updates cause
the OnPaint method to be called for the different Panel *and* for the
containing Panel. However, I want all results to be displayed at once.
In other words, how can I wait for all subpanels to be drawn, before
displaying the results.
Double buffering is activated on all components with:
this.SetStyle(ControlStyles.AllPaintingInWmPaint|C ontrolStyles.DoubleBuffer|ControlStyles.UserPaint, true);
As an example:
I have a Panel with on top of that:
- Panel1: Graphics.DrawText(this.sometext,......); in the OnPaint methods
- Panel2: Graphics.DrawText(this.sometext,......); in the OnPaint methods
- Panel3: Graphics.DrawText(this.sometext,......); in the OnPaint methods
- Panel4: Graphics.DrawText(this.sometext,......); in the OnPaint methods
- Panel5: Graphics.DrawText(this.sometext,......); in the OnPaint methods
now I have a routine that modifies all the sometext values for all the Panel1-5
This gives ma
Panel1 repaints --> OnPaint is called and performed on Panel1, OnPaint is performed for the region of Panel1 in the containing Panel
Panel1 is refreshed on screen
Panel2 repaints --> OnPaint is called and performed on Panel2, OnPaint is performed for the region of Panel2 in the containing Panel
Panel2 is refresh on screen
and so on...
I want:
Panel1 has changed some text
<optionally Panel1 is refreshed *off* screen>
Panel2 has changed some text
<optionally Panel2 is refreshed *off* screen>
Panel3 has changed some text
<optionally Panel3 is refreshed *off* screen>
.....
the containing Panel is refreshed and all updates are done at once
I must add a double buffer somewhere; but I don't know where exactly nor how.
Any help is appreciated!
Kind regards,
SirThanxALot