Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IB's TabsControl resizing



on 1/03/2005 9:23 Am, Eric Schlegel at email@hidden wrote:

> On Mar 1, 2005, at 9:34 PM, Mike Kluev wrote:
> 
>> When I programmatically resize tabs control that was created in
>> interface builder e.g. to make it smaller, I observe drawing artifacts
>> on switching tabs (extra area outside tabs control is erased, tabs
>> themselves are getting erased and not updated properly) . Looks like
>> those userPanes created by IB runtime, corresponding to each tab pane
>> (aka "Tab Items" in IB user interface) are not resized appropriately.
>> Whose responsibility is it to resize those user panes (e.g. by means
>> of kEventControlBoundsChanged event installed on the tabs control
>> target), mine or IB runtime? If the latter I'll file a bug.
> 
> Yours.

Thanks. I was frightened to mess with those internal user panes
whose existence in itself is uncertain, because it is implementation
detail of IB runtime.

> BTW, even if I *do not* resize tabs control, it still has some minor
> drawing artifacts on switching tabs, presumably due to the same issue:
> those userpanes sizes match the size of tab control itself, so when
> the user pane is erased it wipes that nice rounded tab frame (left
> right and bottom sides of tabs control  frame are affected).

So even if I do not resize tabs control it is not considered a bug
that tabs control is not drawn correctly right out of the box?

OK, what should be correct rectangle for that IB runtime's user
item? If I do this, what should be correct inset values?

GetControlBounds(tab, &r);
r.top += topInset;
r.bottom -= bottomInset;
r.left += leftInset;
r.right -= rightInset;
SetControlBounds(all those user panes of tab, &r);

Experiments show that left/right/bottom insets should be 2, though
I am not sure if it is ok to hardcode this and if that could be
changed in future OS version. Should I calculate insets based on
some GetThemeMetric?

Do you guys use something else to solve this drawing issue?

Mike


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: IB's TabsControl resizing (From: Eric Schlegel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.