• 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: Temporary text display over NSTableView (was NSTextField over NSImageView?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Temporary text display over NSTableView (was NSTextField over NSImageView?)


  • Subject: Re: Temporary text display over NSTableView (was NSTextField over NSImageView?)
  • From: James Bucanek <email@hidden>
  • Date: Mon, 24 Apr 2006 07:46:30 -0700

Andy Lee wrote on Sunday, April 23, 2006:
>
>On the other hand, now that Ondra and Ricky have advocated the
>overlay window approach, I'd give that serious consideration.  It has
>the advantage that it doesn't care whether the table has subviews.

Right, and it's what make the approach so appealing. I don't have to worry anything about any side effects (both documented and undocumented) of modifying the view hierarchy of NSTableView.

>> I would look into using an overlay window.  Basically you:
>[...]
>> (d) add logic to show/hide the overlay as needed.
>
>Depending on how permissive you are about resizing the parent window,
>you might need to (e) listen for resize notifications in case the
>table view gets resized or clipped in response to resizing of the
>parent window.  The logic could get a little tricky, because if the
>table view gets clipped, you want the overlay text to be clipped as
>well.

I think I should be relatively immune to these problems. The NSTableView/NSScrollView in question fills one pane of an NSSplitView. The pane can't be minimized and that table should never (famous last words) get clipped by anything else in that window.

>I just thought of another possible approach: when the table is
>logically empty, you could add a single row to it whose height fills
>the whole table, and use that cell to display your message.

That's a brilliant suggestion, but is complicated by the fact that the table has multiple columns. I'm also looking into making this a more generic solution for several other elements in my interface, so a non-table-specific solution still looks better.

Thanks for the insights,

James
--
James Bucanek
 _______________________________________________
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

References: 
 >Re: Temporary text display over NSTableView (was NSTextField over NSImageView?) (From: Andy Lee <email@hidden>)

  • Prev by Date: Getting a table to resize columns. I'm doing everything right but it's not working?
  • Next by Date: Re: Superimpose a NSTextField over NSImageView?
  • Previous by thread: Re: Temporary text display over NSTableView (was NSTextField over NSImageView?)
  • Next by thread: Re: Superimpose a NSTextField over NSImageView?
  • Index(es):
    • Date
    • Thread