Impossible to select pad by TButton

I work on Windows XP with ROOT 5.15/08. In the following short CINT macro:
{
TCanvas *canvas = new TCanvas(“mycanvas”,“mycanvas”,2,2,800,400);
canvas->cd();
TPad *pad1 = new TPad(“LeftPad”,“LeftPad”,0.3,0.1,0.55,0.9);
pad1->Draw();
TPad *pad2 = new TPad(“RightPad”,“RightPad”,0.65,0.1,0.9,0.9);
pad2->Draw();
canvas->cd();
TButton *b1 = new TButton(“SelectPad1”,“pad1->cd();”,0.05,0.1,0.25,0.45);
b1->SetTextSize(0.2);
b1->Draw();
TButton *b2 = new TButton(“SelectPad2”,“pad2->cd();”,0.05,0.55,0.25,0.9);
b2->SetTextSize(0.2);
b2->Draw();
canvas->Modified();
canvas->Update();
pad1->cd();
}
I create a TCanvas with 2 TPad and 2 TButton. The button are programmed to select pad1 or to select pad2, but in fact, they do nothing. Why?
I have also tried with a TDialogCanvas, same problem. I join the macro also as attachment. Thanks for your help.
NotSelectable.C (566 Bytes)

Setting the current pad from a TButton was not possible.
I have modifed TCanvas in CVS head such that it is now possible and I have modified your script accordingly. This change will be part of the pro release 5.16 (June 27)

Rene
NotSelectable.C (594 Bytes)

Many thanks René