• 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:NSSplitView query
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re:NSSplitView query


  • Subject: Re:NSSplitView query
  • From: Terry Smyth <email@hidden>
  • Date: Thu, 17 Oct 2002 16:28:17 +0100

>>Hi,
>>
>>I'm trying to implement a split view, but can't quite get the behavior
>>I want, and wonder if anyone can help.
>>
>>I have 2 table views in my window. Selecting a row in the upper table
>>displays a list of details in the lower table. The lower table has a
>>text label just above it. These tables seem an obvious candidate for a
>>horizontal split view, but I want the text label to remain in position
>>above the lower table.
>>
>>So I group the lower table plus the text label in a view, then group
>>this view with the upper table in a split view. This is fine except
>>that as the lower view (table + text) is resized, the text label moves
>>slightly relative to the table. (ie the subviews are resized
>>proportionally - which is what I would expect, but not what I want).
>>How can I arrange it so that just the table within the view is
resized,
>>but not the text?

>hi there, dunno if this helps, but if you're making a
>
> subview -> box
>
>of the lower table, then selecting that box and the upper table to
make the split >view, the box' label stays where you'd expect it to.
>
>m

Thanks m,

That's one way I hadn't thought of. However, I wanted to avoid boxes if
possible as suggested by the aqua guidelines. So after some further
reading, I found another solution. I created my own custom view
(subclass of NSView), containing my table and label text. In my
subclass, all I had to do was override resizeSubviewsWithOldSize: and
apply all the resizing to the table, and just move the text by the
right amount. This was easy, and as ever, seems obvious in hindsight.

Regards,
Terry
_______________________________________________
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.

  • Prev by Date: NSImageView & scroll
  • Next by Date: NSTableView background erasing, how to stop ??
  • Previous by thread: Re: NSSplitView query
  • Next by thread: Table View and Tool Tips
  • Index(es):
    • Date
    • Thread