On 7 Aug 2006, at 16:43, Chris Espinosa wrote:
On Aug 7, 2006, at 8:27 AM, António P. F.Almeida 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).
http://developer.apple.com/documentation/Carbon/Conceptual/display_databrowser/3. Is it possible to change the layout and item titles in a radio group buttons ? If not, how to, getting them from Interface Builder, turn two or more single radio buttons mutually exclusive ?
Use a Radio Group control, it looks like Radio 1 Radio 2 in the Interface Builder Controls pane.
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
|