Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!uunet!sco!jamesm From: jamesm@sco.COM (James M. Moore) Newsgroups: comp.sys.mac.programmer Subject: Think class lib - question about CPanorama and CScrollPane Message-ID: <7532@viscous.sco.COM> Date: 20 Nov 89 17:26:25 GMT Sender: news@sco.COM Reply-To: jamesm@sco.COM (James M. Moore) Organization: An tOibriu Santa Cruz Lines: 74 I'm having some problems with the CScrollWindow class. I'm not getting any response to clicks on the scrollbars. I've stepped through CView::DispatchClick, and it looks like I'm just not getting the scroll bars back from CView::FindSubview. I've looked at what's done in the Art example, and the CClipboard, but it looks like I'm doing basically the same thing. I'm obviously getting something wrong, but I just don't see it. The routine gets called from my document class like so: w->IClassWindow(30774, FALSE, gDesktop, this, aClass); [BClassWindow is a subclass of CWindow. scrollPane is CScrollPane. classPicture is BClassWindow, which is a subclass of CPanorama with only the Draw() method overridden.] void BClassWindow::IClassWindow( short WINDid, Boolean aFloating, CDesktop *anEnclosure, CDirector *aSupervisor, BClass *theCls ) { Str255 title; Rect bounds; Point y; inherited::IWindow(WINDid, aFloating, anEnclosure, aSupervisor); this->theClass = theCls; theCls->ClassName((char *) title); CtoPstr(title); this->SetTitle(title); this->SetActClick(true); /* * setup scroll pane */ scrollPane = new(CScrollPane); scrollPane->IScrollPane(this, this, 0, 0, 0, 0, sizELASTIC, sizELASTIC, true, true, true); scrollPane->FitToEnclFrame(true, true); scrollPane->DoClick(y, 0, 0); /* * setup panorama */ classPicture = new(BClassPanorama); classPicture->IPanorama(scrollPane, this, 0, 0, 0, 0, sizELASTIC, sizELASTIC); classPicture->FitToEnclFrame(true, true); /* * install the panorama into the scroll frame */ scrollPane->InstallPanorama(classPicture); /* * grow the panorama */ SetRect(&bounds, 0, 0, 500, 500); classPicture->SetBounds(&bounds); classPicture->SetScales(1, 1); /* * Put the window onto the screen */ this->Select(); }; -- James Moore | Nil aon .sig maith agam anois - Santa Cruz Operation UNIX Tech Support | B'fheidir an tseachtaine seo jamesm@sco.com | chugainn.