Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Customizing a NavServices dialog (Carbon) -- Follow-up
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Customizing a NavServices dialog (Carbon) -- Follow-up



On Wed, 21 Dec 2005 16:52:47, Michael McLaughlin <email@hidden> wrote:

> Thank you for the good advice.  My customizing is now functional but I am
> still left with one small mystery that I want to clear up.
>
> My custom area looks like this:
>
> Format:  EPS   PNG
>
> where EPS and PNG are the top row of a radio group (one row, two columns),
> with EPS as the default.
>
> Upon receiving a kNavCBAccept, I do the following:
>
> ***** code *****
>
> case kNavCBAccept:
> {
> const ControlID    RgID = {'rdgr', 1001};
> HIViewRef            radioGroup, PNGRadio;
> if (fromGraf) {
> status = ::HIViewFindByID(::HIViewGetRoot(inParams->window), RgID,
> &radioGroup);
> PNGRadio = ::HIViewGetFirstSubview(radioGroup); // note FIRST
> isPNG = (::GetControlValue(PNGRadio) == 1);     // externed
> }
> break;
> }
>
> *****
>
> IB notwithstanding, the system (10.4.3) insists that PNG is the *first*
> subview and EPS is the *last*.  Is this actually the way it is supposed to
> be?  If so, then I assume that subviews are seen as a list and traversing is
> from front() to back().  Is that right?  Is this something to do with
> "z-order" (not explained anywhere that I can find).

Just GetControlValue of the radio group itself.

BTW, may be not in this particular case, you may create radio group
in IB another way: use either "HIView" or "Custom Control" (event
based) and specify com.apple.HIRadioGroup as class ID. Even proc
pointer based custom control works. Then embed individual radio
buttons in it. I'd do this if I want direct access to individual
radio buttons in IB (e.g. to set their properties or signatures,
or to use non standard layout, or to set the value of few radio
buttons to kControlRadioButtonMixedValue, etc.)

Mike

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

This email sent to email@hidden



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.