home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!spool.mu.edu!agate!boulder!csn!qwerty-gw.fsl.noaa.gov!yoda.fsl.noaa.gov!urban
- From: urban@yoda.fsl.noaa.gov (Art Urban)
- Subject: Re: Newbie TCL question on mouse clicks
- Message-ID: <1993Jan11.231746.19670@fsl.noaa.gov>
- Sender: urban@fsl.noaa.gov
- Organization: Forecast Systems Lab, NOAA, Boulder CO, USA
- References: <1isahqINN6ie@jumbo.read.tasc.com>
- Distribution: usa
- Date: Mon, 11 Jan 1993 23:17:46 GMT
- Lines: 35
-
- In article <1isahqINN6ie@jumbo.read.tasc.com> dstrout@sun.rest.tasc.com writes:
- %
- %Beginner question on mouse clicks. I made a copy of the TCL starter app,
- %and put these lines in the Draw method in CStarterPane()
- %
- %TextFont(1);
- %MoveTo(50,50);
- %DrawString("\pHello World");
- %
- %That works fine. Every new doc has "Hello world" in it. But when I move
- %those same lines to the DoClick method, (Idea being draw it only after I
- %click in the window) nothing happens. In fact, if I put SysBeep(1) in the
- %DoClick(), It doesn't beep. What else do I need to do?
-
- By default CPane's do not want clicks; I think this is your problem. If
- you send the following message, I believe it will work okay. Keep in mind
- that you must send this *after* the object is inititialized. It doesn't
- need to be *right* after, just after:
-
- CStarterPane->SetWantsClicks ( TRUE );
-
- Or, you can do this as well, but it must come after itsMainPane is
- set the to the CStarterPane instance.
-
- itsMainPane->SetWantsClicks ( TRUE );
-
- Hope this helps!
-
-
-
- --
- Art Urban urban@yoda.fsl.noaa.gov
- ===============================================================================
- "Look, he's being attacked by creamy nugget centers." -Joel
- ===============================================================================
-