gPad->Update vs canvas->Update

I have a silly question. I have a GUI that I have made with many canvases. Actually EmbeddedCanvas. Each has it’s own timeout function to update the contents. Previously I had been using gPad->Update when I modified the contents. Well, as you might imagine this only works for the current pad.

When I do a canvas->Update I don’t really get what I want.

Is the following the same as a gPad-Update?

canvas->cd()
canvas->Update()
canvas->Modified()

Seems like I actually have to touch the canvas to get the update to appear.
Chris

Chris,

Do:

gPad->Modified(); gPad->Update();
Rene

The problem is that I change windows in between draws and the gPad is not updated to the current window.

Is it sufficient to do a canvas->cd() before your suggestion?
Chris

You do not need to canvas.cd().

Simply call pad->Modified();
pad->Update();

where pad is a pointer to the pad/canvas to be updated.
When you call canvas.Update(), the function will repaint all pads
in the canvas that have beit bit kModified set.

Rene