Re: Drawing text chunks (e.g. paras) in a text view with alternating background colours

2009-09-24 Thread Keith Blount
#x27;s drawing methods. Many thanks again! All the best, Keith --- On Thu, 9/24/09, Ross Carter wrote: > From: Ross Carter > Subject: Re: Drawing text chunks (e.g. paras) in a text view with alternating > background colours > To: "Keith Blount" , "Cocoa-dev" >

Re: Drawing text chunks (e.g. paras) in a text view with alternating background colours

2009-09-24 Thread Ross Carter
Hi, Keith. Couple of thoughts: In my NSTextView subclass’s -drawViewBackgroundInRect: method, I get the range of characters in the current -visibleRect: using code similar to this: -visibleRect is a much larger rect than you need, I should think. What's wrong with using the rect passed to

Drawing text chunks (e.g. paras) in a text view with alternating background colours

2009-09-23 Thread Keith Blount
Hi, I have a text view that needs to draw different ranges of text with different background colours - although this isn’t as straightforward as it sounds as I’m not talking about text attributes but the actual text view background itself marking out different passages. Essentially I have an NS