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

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

2009-09-24 Thread Keith Blount
--- On Thu, 9/24/09, Ross Carter rosscarter...@me.com wrote: From: Ross Carter rosscarter...@me.com Subject: Re: Drawing text chunks (e.g. paras) in a text view with alternating background colours To: Keith Blount keithblo...@yahoo.com, Cocoa-dev cocoa-dev@lists.apple.com Date: Thursday, September

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