Hi, I want to use TRootEmbeddedCanvas with a TGStatusBar. However, TRootEmbeddedCanvas instantiates its TCanvas *fCanvas with a constructor which disallows a TGStatusBar. So I create my TRootEmbeddedCanvas from another TGCompositeFrame (fParent of TRootEmbeddedCanvas) which owns a TGStatusBar and has a menu item which toggles an fShowEventStatus switch. Then I have to modify the methods like: TRootEmbeddedCanvas::HandleContainerButton(Event_t event) to forward event status information to fParent's TGStatusBar using: ((ParentType*)fParent)->SetStatusText(fCanvas->GetSelected()->GetObjec tInfo(px,py),ipart); I'd prefer not to have to modify TRootEmbeddedCanvas. Adding the ParentType dependency to the modified TRootEmbeddedCanvas class seems particularly ugly. Is there a better way to do this? For example, the TRootEmbeddedContainer class might be a logical place to provide status bar and perhaps menu functionality. Thanks. George
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:40 MET