Re: [Fwd: Re: Problem Drawing within TButton]

From: Olivier Couet <couet_at_mail.cern.ch>
Date: Tue, 30 Aug 2005 11:32:11 +0200 (CEST)

Hi Dylan,

 Why don't you do simply the following ?

void latexbutton()
{

   TCanvas *c = new TCanvas("canvas", "Canvas", 500,600);    TButton *b = new TButton("#bar{Text}", "", 0.05, 0.05, 0.95, 0.95);

   b->SetTextFont(42);
   b->SetTextSize(0.05);
   b->Draw();

}

The trick is to change the font precision (2) to make sure the button string is plotted as a TLatex and not as a TText.

 Cheers, Olivier

Date: Tue, 2 Aug 2005 13:24:49 -0600
From: Dylan Maxwell <Dylan.Maxwell_at_lightsource.ca> To: Ilka Antcheva <Ilka.Antcheva_at_cern.ch> Cc: roottalk_at_pcroot.cern.ch
Subject: RE: [ROOT] Problem Drawing within TButton                                                                                 

I want to create a TButton which contains a TLatex object. When I create a canvas with a single button and then draw a latex object within the button, the latex is NOT visible. But, if I run nearly the exact same script, except this time I draw a graph inside the button along with the latex object both the graph and the latex as displayed as I would expect.                                                                                 

I've attached a script which demonstrates.                                                                                 

Thanks,
Dylan Received on Tue Aug 30 2005 - 11:41:31 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:12 MET