• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: New to Carbon - a few questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New to Carbon - a few questions


  • Subject: Re: New to Carbon - a few questions
  • From: Jerry <email@hidden>
  • Date: Mon, 7 Aug 2006 17:04:24 +0100


On 7 Aug 2006, at 16:43, Chris Espinosa wrote:


On Aug 7, 2006, at 8:27 AM, António P. F.Almeida wrote:

2. Cannot see a listbox in Xcode Interface Builder.
How to include a listbox in a Carbon application ?

http://developer.apple.com/samplecode/SimpleList/

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.

http://developer.apple.com/documentation/Carbon/Conceptual/HandlingWindowsControls/art/nibwindows.gif

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:

This email sent to email@hidden

  • Prev by Date: Re: Xcode operations aren't synchronous (was: Re: crashes after changing signatures of virtual functions / virtual inherited classes)
  • Next by Date: Re: Xcode operations aren't synchronous
  • Previous by thread: Re: Window min/max height trouble
  • Next by thread: Re: Xcode operations aren't synchronous
  • Index(es):
    • Date
    • Thread