home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 21234 < prev    next >
Encoding:
Text File  |  1993-01-11  |  1.7 KB  |  48 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!spool.mu.edu!agate!boulder!csn!qwerty-gw.fsl.noaa.gov!yoda.fsl.noaa.gov!urban
  3. From: urban@yoda.fsl.noaa.gov (Art Urban)
  4. Subject: Re: Newbie TCL question on mouse clicks
  5. Message-ID: <1993Jan11.231746.19670@fsl.noaa.gov>
  6. Sender: urban@fsl.noaa.gov 
  7. Organization: Forecast Systems Lab, NOAA, Boulder CO, USA
  8. References: <1isahqINN6ie@jumbo.read.tasc.com>
  9. Distribution: usa
  10. Date: Mon, 11 Jan 1993 23:17:46 GMT
  11. Lines: 35
  12.  
  13. In article <1isahqINN6ie@jumbo.read.tasc.com> dstrout@sun.rest.tasc.com writes:
  14. %
  15. %Beginner question on mouse clicks.  I made a copy of the TCL starter app,  
  16. %and put these lines in the Draw method in CStarterPane()
  17. %
  18. %TextFont(1);
  19. %MoveTo(50,50);
  20. %DrawString("\pHello World");
  21. %
  22. %That works fine.  Every new doc has "Hello world" in it.  But when I move  
  23. %those same lines to the DoClick method, (Idea being draw it only after I  
  24. %click in the window) nothing happens.  In fact, if I put SysBeep(1) in the  
  25. %DoClick(), It doesn't beep.  What else do I need to do?
  26.  
  27. By default CPane's do not want clicks; I think this is your problem. If
  28. you send the following message, I believe it will work okay. Keep in mind
  29. that you must send this *after* the object is inititialized. It doesn't
  30. need to be *right* after, just after:
  31.  
  32.     CStarterPane->SetWantsClicks ( TRUE );
  33.  
  34. Or, you can do this as well, but it must come after itsMainPane is
  35. set the to the CStarterPane instance.
  36.  
  37.     itsMainPane->SetWantsClicks ( TRUE );
  38.  
  39. Hope this helps!
  40.  
  41.  
  42.  
  43. -- 
  44. Art Urban                             urban@yoda.fsl.noaa.gov
  45. ===============================================================================
  46.  "Look, he's being attacked by creamy nugget centers."              -Joel
  47. ===============================================================================
  48.