• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Which alternate row color spec is correct?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Which alternate row color spec is correct?


  • Subject: Re: Which alternate row color spec is correct?
  • From: Jens Bauer <email@hidden>
  • Date: Tue, 5 Aug 2003 22:32:54 +0200

Hi Dave,

On Tuesday, Aug 5, 2003, at 19:40 Europe/Copenhagen, Dave Thorup wrote:

On 8/5/03 7:42 AM, "Jens Bauer" <email@hidden> wrote:

-Eg: Why do more work than necessary ?

Imagine you have 3 visible rows. If you paint the first and the third
row blue, you will have to paint twice (remember, the background has
already been painted white!)
-Now, if you paint only the second row blue, you'll do half the work. :)

...Just my opinion on it. ;)

Do you mean that you'd only make the "stripes" for rows in the table that
contain data?

Nope, you'd need them for every row that is visible in the NSTableView (or whatever you use). The other thing would look wrong. :)

If that's what you want, then yes, doing as you say may be
faster a tiny bit faster. However, all table views and outline views that
I've seen from Apple (and any other app) paint all the rows in the view with
stripes, not just the ones that contain data.

That's the way it should be.

In that case, on average you're going to be painting just as many blue rows
one way as you will the other way.

If you always skip the first, you'll have a chance of drawing one row *less*.

imagine you have room for 9 columns on the screen. Blue is represented by a 1 bit, white by a 0 bit:

1010101 = 4 blue rows, 3 white rows (first row is blue)
0101010 = 3 blue rows, 4 white rows (first row is white)

I don't really care whether blue is first or white is first, I can't even
remember how my apps do it. If you ask me, either way is just as good so
long as _ALL_ the rows in the table (not just ones with data) are painted
with alternating colors.

:)


Love,
Jens
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Which alternate row color spec is correct?
      • From: "Clark S. Cox III" <email@hidden>
References: 
 >Re: Which alternate row color spec is correct? (From: Dave Thorup <email@hidden>)

  • Prev by Date: Re: break, continue, goto
  • Next by Date: Re: Cross platform development
  • Previous by thread: Re: Which alternate row color spec is correct?
  • Next by thread: Re: Which alternate row color spec is correct?
  • Index(es):
    • Date
    • Thread