| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On 7 Aug 2006, at 16:43, Chris Espinosa wrote:
I really like the description for that sample code: "simple illustration of a ListBox Control implementation and its pitfall". The pitfall being, of course, that you can't use a ListBox control in a compositing window. What you need to do is to use the DataBrowser control. Learning how to use this control takes no more than a month and there are thousands of threads on the Carbon-dev mailing list alerting you to its own pitfalls. The alternative is to write your own list box control (which is what we did: we did our porting at a time when DataBrowser didn't work in compositing windows, but Unicode edit controls didn't work in non-compositing windows so we had no choice).
You can't change the layout of this control though. If you want mutually-exclusive buttons with a different layout, you can't do the mutually-exclusive part in IB. You need to do it in code, handling the kEventControlHit event and turning off the other buttons in the handler. If you're ambitious, you can write a radio group custom control which does this for you and create an instance of it in IB to enclose your radio buttons. This isn't hard, but it's not for a Carbon newbie :-) You'll find that Carbon controls are a constant source of excitement, particularly in conjunction with IB which helpfully prevents you from setting many of the control settings, forcing you to do it in code. You'll also be able to marvel at the way in which while there are about a dozen controls which take an icon, no two of them take the same set of icon formats, and the documentation lies about which ones work. You should also join the carbon-dev mailing list (not you, Chris) as it's more suited to carbon questions. Jerry |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/xcode-users/email@hidden This email sent to email@hidden
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.