• 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
table view with non-selectable rows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

table view with non-selectable rows


  • Subject: table view with non-selectable rows
  • From: Andreas Mayer <email@hidden>
  • Date: Sat, 15 Oct 2005 22:31:23 +0200

Hi all.

I have got a problem with a table view.

What I want:

A table view which does not highlight rows but allows the user to klick checkboxes in a column of said table view.

Picture:

PNG image


As you can see I already managed to remove the background.

To avoid the rows from highlighting, I tried to implement the - tableView:shouldSelectRow: delegate method and prevent the user from selecting a row. But if I do so, it is no longer possible to change the value of the check box in the first column.

After some experimentation I found a method that *almost* works. I do overwrite -_highlightColorForCell: and return [[self window] backgroundColor].

This has two drawbacks:

1. _highlightColorForCell: is a private method that I really shouldn't overwrite at all

2. NSTableView's highlighting code seems to assume that a highlighted row is opaque. But I'm using that table view inside a sheet which is slightly transparent. So - depending on the contents of the window below - a highlighted row does still look different from the not highlighted one because it draws its background opaque.

Any solutions, anyone?


Andreas
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: table view with non-selectable rows
      • From: Ryan Stevens <email@hidden>
  • Prev by Date: Re: NSDocumentController's closeAllDocuments... & NSApplication - AHA!!
  • Next by Date: Avoid creating a new document when launching an application
  • Previous by thread: Re: NSDocumentController's closeAllDocuments... & NSApplication - AHA!!
  • Next by thread: Re: table view with non-selectable rows
  • Index(es):
    • Date
    • Thread