Peter--
>1) How do I add a line of text to it? I'm using it as a status report window
>and want the application to add comments to it. The TTEView object only has
>SetText() and StuffText() which set the whole thing. I want to do the
>equivalent of a TEInsert. That's currently what I'm doing (TEInsert( stuff
>, fTTEVIew->fhTE)) but I wasn't sure if that was ok...
What you probably ought to do is create a subclass of TTEView that includes
methods for appending text to the end of the view. This'll give you a lot more
flexibility in implementation and it'll minimize the amount of knowledge other
objects have to have about the TE view (which is always a good thing in O-O
programming). If you're including the view in a view hierarchy, this'll still
work. Still use the TTEView object in your view editor, but change the class
name to the name of your subclass. [The methods you add, by the way, can
certainly do the algorithm you show; I'd just be wary of doing that from
outside the class.]
>2) I'm getting some weird selection effects when I try to select a large area
>of text and it does autoscrolling. Little pieces get updated incorrectly.
I've had this kind of problem before too, and I'm not sure I know what causes
it (it's been a while). One easy thing you might check is that you have a
selection adorner attached to your TE view. I can't remember for sure whether
you need one here, but I know that's screwed me up in a lot of other places.
Hope this helps,
Rich Gillam
GE Information Services