Problem with GetPrimitive usage

Dear Experts,

I’m trying to do very simple thing - to change the color of the TPaveText::title. For that I do:

TPaveText title = (TPaveText) (gPad->GetPrimitive(“title”));

While the first line is accepted by Root well, it curses very badly for the following lines, saying

Error: Symbol title is not defined in current scope Plotting.C:122:
Error: Failed to evaluate title->SetFillColor(3)
*** Interpreter error recovered ***

I’m using root version 5.30/06.

Can you please help?
Thanks in advance.

if you are doing that in a macro you should do:


before these three lines.