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: TabPanels and kEventControlDraw



On Friday, May 30, 2003, at 02:18 PM, Joseph J. Strout wrote:

I've got a custom control whose carbon event handler (currently, just for kEventControlDraw) gets invoked when the window first appears, when it activates and deactivates, and when that part of the window is invalidated.

But it's not invoked when the control is on a tab panel, and we switch to a different tab. I can switch back and forth all day, and never see a kEventControlDraw. As a result, my control (which is initially visible) disappears when I switch tabs, controls which should be on the other pane don't appear, and my first control never reappears even when I switch back.

So I guess my questions are twofold:

1. How do I embed my custom control in the proper pane of the tab panel, so the system will know when to draw it?

2. If not obvious from the answer to 1, then what else do I need to do to get a kEventControlDraw when the user switches tabs so I can make my control appear?

I'm assuming (although you don't explicitly state it) that each tab pane is its own user pane control, and that you have the controls for that tab pane embedded in the user pane, and that when you switch tabs, you also hide the current user pane and show the user pane of the new tab. That's the usual approach.

You should just embed your custom control in the user pane corresponding to the appropriate tab.

-eric
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >TabPanels and kEventControlDraw (From: "Joseph J. Strout" <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.