Re: Temporary text display over NSTableView (was NSTextField over NSImageView?)
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