PtList: disable refreshing

I’m looking for recipe for the elimination on redraw flashing effect.

I use PtList as a container of my data. It must be refreshed with about 3 Hz
frequency (IOW, 3 times per second).

Data can change radically, so, now I do this (it’s pseudo code):
OnTimerEvent (every 300 msec)
{
ClearPtList ();
AddNewItems (); // item by item, i.e. in cycle, on my PIII it works nice,
// but on a target machine (x86, 133 MHz) I can see all
// stages above and the whole picture flashes
}

I think, this will be better:
OnTimerEvent
{
DisableDrawing (); // ← how to do this?

ClearPtList ();
AddNewItems (); // item by item, i.e. in cycle, on my PIII it works nice,
// but on a target machine I can see all stages above and
// the whole picture flashes

EnableDrawing (); // ← how to do this?
}

Can anybody tell me how to do Disable and Enable Drawing for particular widget?

PtHold() and friends

Cheers,
/Johan

It seemed to be exactly what I needed in, but it didn’t help. Picture
is still flickering. I’m sure it was correct using of PtHold/PtRelease
(I tried PtContainerHold/PtContainerRelease too), because without
Pt(Container)Release it didn’t redraw itself at all.

Now I’m thinking about Offscreen and context switching.

This can be done somehow like this (just pseudo-code):
CreateOffscreenContext();
SelectOffscreenContext(); // draw in an offscreen area of video memory
DrawTheWholePicture();
BitBlitPicture();
SelectOldContext();

Do you think it’ll help?

The most doubtful thing is whether widgets will draw themselves onto
offscreen area, or they’ll continue drawing themselves onto its
visible part?

no, if you want widgets in a OSC context, use the PtOSContainer widget. the Pg* funcs for OSC is only for raw drawing.

Thank you, that’s it. It is 100% I wanted to get.
Thank you very much once more.