Hi Rene,
I draw a class A which paints (in Paint) some TLine. I have two different kind of lines which are painted and I want to be able to open the corresponding dialog to change the line style. The two line styles TAttLine are a datamember in my clas A.
For several reasons it is not possible to draw each graphical object, I can only draw the container and than paint the graphical elements in Paint() of this object.
None of the examples you mention has two different line styles. Assume a very simple example: You have a box in which the two parallel border lines should have different line styles and the user should be able to change it.
Thomas.
Rene Brun wrote:
> Thomas,
>
> It does not make sense to draw a TAttxxx class.
> What do you want to draw? where?
> These classes make sense only when used with multiple inheritance
> in TObject derived objects. See plenty of examples in ROOT classes
> Tline, TBix, TText, TH1, etc.
>
> Rene Brun
>
> On Fri, 29 Jul 2005, Thomas Bretz wrote:
>
>> How can I draw a TAtt*, this classes do not derive from TObject. >> >> Do I have to make a workaround as >> class MyAtt : public TObject, public TAttMarker >> { >> } >> >> Thomas. >> >> Rene Brun wrote: >> >>> Two points: >>> -the object must be drawn in the pad >>> -the function with *MENU* must be a public function >>> >>> Rene >>> >>> On Thu, 28 Jul 2005, Thomas Bretz wrote: >>> >>>> Dear all, >>>> >>>> I have a class which contains two TAttMarkerStyle for two different >>>> purposes. I thought, I could add both to the context menu by: >>>> >>>> class A : public TAttLine >>>> { >>>> TAttMarker m1; >>>> TAttMarker m2; >>>> void SetAtt1() { m1.SetMarkerAttributes; } //*MENU* >>>> void SetAtt2() { m2.SetMarkerAttributes; } //*MENU* >>>> } >>>> But using the corresponding menu entries in the context menu I >>>> always get the SetLineAttributes() menu... >>>> >>>> You can reproduce it in the interpreter by: >>>> new TCanvas; >>>> TAttMarker m; >>>> m.SetMarkerAttributes(); >>>> >>>> --> You get the SetPadAttributes() menu. >>>> >>>> I'm using root 4.04/02. >>>> >>>> Can somebody help me? >>>> >>>> Thanks in advance, >>>> Thomas. >>>> >>> >>
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:11 MET