void but1() {
//   example of a dialogcanvas with a few buttons

   TDialogCanvas *dialog = new TDialogCanvas("dialog","",200,300);

// Create first button. Clicking on this button will execute 34+56
   TButton *but1 = new TButton("button1","34+56",.05,.8,.45,.88);
   but1->Draw();

// Create second button. Clicking on this button will create a new canvas
   TButton *but2 = new TButton("canvas","c2 = new TCanvas(\"c2\")",.55,.8,.95,.88);
   but2->Draw();

// Create third button. Clicking on this button will invoke the browser
   but3 = new TButton("Browser","br = new TBrowser(\"br\")",0.25,0.54,0.75,0.64);
   but3->SetFillColor(42);
   but3->Draw();

// Create last button with no name. Instead a graph is draw inside the button
// Clicking on this button will invoke the macro tutorials/graph.C
   button = new TButton("",".x graph.C",0.15,0.15,0.85,0.38);
   button->SetFillColor(42);
   button->Draw();
   button->SetEditable(kTRUE);   //<--- added line
   button->cd();
   
   Double_t x[8] = {0.08,0.21,0.34,0.48,0.61,0.7,0.81,0.92};
   Double_t y[8] = {0.2,0.65,0.4,0.34,0.24,0.43,0.75,0.52};
   TGraph *graph = new TGraph(8,x,y);
   graph->SetMarkerColor(4);
   graph->SetMarkerStyle(21);

   graph->Draw("lp");

   dialog->cd();
}


