Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!samsung!umich!csmil.umich.edu!zug.csmil.umich.edu!cash From: cash@zug.csmil.umich.edu (Howard Cash) Newsgroups: comp.sys.mac.programmer Subject: Re: Think C StaticText Panes Message-ID: <1990Aug4.201900.2203@csmil.umich.edu> Date: 4 Aug 90 20:19:00 GMT References: <14702@csli.Stanford.EDU> <1990Jul29.040422.21686@cbnewsk.att.com> Sender: news@csmil.umich.edu Organization: Cognitive Science and Machine Intelligence Laboratory Lines: 21 In article <1990Jul29.040422.21686@cbnewsk.att.com> ech@cbnewsk.att.com (ned.horvath) writes: >From article <14702@csli.Stanford.EDU>, by weyand@csli.Stanford.EDU (Chris Weyand): >> I have an application for which I am currently using a lot of StaticText >> (Think C 4.0) panes to display small pieces of text. Is this a bad idea in >> terms of memory? What are some other alternatives; > >For the latter, you might just want to define a subclass of StaticText that >behaved this way... > TCL's CStaticText is very wasteful (except as a superclass of CEditText for purposes of organizing the code). It creates a TEdit record (a relatively bulky data structure) even though none of TEdit's editing functionality will be used. If you are going to use a lot of static text in your app, consider building a new class that uses TextBox (Inside Mac Vol1, p388) or, if the text does not need formatting, just storing the string and drawing it in a Pane in the ::Draw method. -Hobart