[futurebasic] Re: [FB] NSTabView - zero rect item view

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 2016 : Group Archive : Group : All Groups

From: John Hempel <hempel@...>
Date: Fri, 25 Nov 2016 10:58:56 -0600
> On Nov 24, 2016, at 3:10 AM, Bernie <bernie.fblist@...> wrote:
> 
> 
> Steve wrote:
> 
>> /*
>>  NSTabView demo that uses a subclassed NSView…
>> */
> 
> Thanks for the demo, Steve.
> 
>> Interestingly, the white rectangle is seen on tab2 even though no frame rectangle is set.
> 
> That’s because a tab item’s contained view is resized to its tab view’s content rect every time its tab item is selected (there’s more to be said about this for those who attempt to position subviews within a tab by adjusting the tab item’s view rect).  
> 
> So why doesn’t an item view’s subview (one which has been autoresized to stick to the right), now appear? Well it still exists, but has been sent to outer space by the confusion of adding it to a view with zero rect. When I say ‘outer space’, the subview is actually sitting at its orginal x value plus superview width (somewhere to the right of the tab item view).
> 
> On my way out just now and wrote the above in a hurry so may have confused matters.
> 
> 
> 
> !DSPAM:3559,5836aeac168011565310984!
> 
>