Create a new default style

Hello,
I’m developing a standalone application with root (compiled with gcc).
I would like to create a new default style for my application.
As reported in the manual, I have written these lines:

TStyle * style = new TStyle("Default2", "Default style");
style->SetLabelFont(42);
style->SetStatFont(42);
style->SetTitleFont(42);
gROOT->SetStyle("Default2");

(in the main() function of my application) but it don’t work because the style of canvases and pads of my application don’t change.

Where is the mistake?

Thank you very much
Andrea Bulgarelli

Andrea,

TStyle has many parameters. The two that you describe are very basic
and may not be used by several objects in the pad. For example if you use histograms, we have dedicated fonts, line colors, etc for histograms.
So changing onlly these two parameters will have 0 effect on your objects.
The same is true for pad attributes, pavetext, stats, title axis attributes.

Rene