Hello!
Thank you for your help so far, I can't tell you how much I appreciate it. I
have a class which inherits from TObject and TAttFill. The object itself is
not drawn in a pad, but some of the objects it contains are drawn. I wish to
be able to use the TAttFillCanvas to change fill attributes for my object
(where I intend to write my own SetFillColor and SetFillStyle methods).
However it appears that it needs to have the object selected somewhere to
access SetFillColor method. Here's what I have tried so far:
root[0] MyClass *myobj = new MyClass;
root[1] gPad->SetSelected(myobj);
root[2] myobj->SetFillAttributes();
root[3] TList *l = gROOT->GetListOfCanvases();
root[4] TAttFillCanvas *fill = (TAttFillCanvas*) l->FindObject("R__attfill");
root[5] fill->SetRefObject(myobj);
>From looking at the source I would think that I would be able to then change
the fill attributes by clicking a button and then clicking "APPLY" button.
However this does not work for me. The "gStyle" button does work, however.
Please, any help would be greatly appreciated. Thanks!
--
Regards,
Micha D. Niskin <mniskin@yahoo.com>
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET