Hi Lynn,

You decide which pushbuttons are to be mutually exclusive.  You then
allocate the same group number to each pushbutton within that group.
Personally I start at group number 1 and count up.

What you have done appears to be correct.

The most likely error is in the value of g_Prefs.curTransIndex.  I can't
remember if the first button is 0 or its button id.

Regards,

On 30/12/06, Lynn Allan <[EMAIL PROTECTED]> wrote:
>
> <alert comment="Palm newbie using CW9.3 />
>
> I'm baffled about using a group of PushButtons in a Preferences dialog.
>
> According to the Palm documentation, FrmSetControlGroupSelection should
> cause the equivalent of "mutually exclusive radio-buttons" to happen.
> However, I don't grasp what the second parameter (groupNum) is supposed to
> be. I've tried 0, 1, and PrefsTransGroup, and get an error message.
>
> I looked at earlier posts on this forum, but I'm still baffled. Several of
> the replies seemed to ask, "Why would you want to know the groupNum?". Um
> .... because it is a parameter to the api call?
>
> Am I doing something wrong, or leaving out a step? Is there an
> undocumented way to get the groupNum?
>
> Am I better off using a PopupList? Is the "work-around" to have a bunch of
> ControlType* pointers for each of the PushButtons and use "brute-force"?
>
> // next line crashes
> FrmSetControlGroupSelection(pPrefsForm,
> ...PrefsTransGroup,    // 0 or 1 also crash
> ...g_Prefs.curTransIndex);
>
> #define PrefsWebTransPb 1041
> #define PrefsNkjvTransPb 1040
> #define PrefsKjvTransPb 1039
> #define PrefsEsvTransPb 1038
> #define PrefsTransGroup 1037
> #define PrefsBbeTransPb 1036
>
> PUSHBUTTON  "BBE" ID PrefsBbeTransPb
>      AT (51 15 19 10) GROUP PrefsTransGroup
> PUSHBUTTON  "ESV" ID PrefsEsvTransPb
>      AT (72 15 19 10) GROUP PrefsTransGroup
> PUSHBUTTON  "KJV" ID PrefsKjvTransPb
>      AT (93 15 19 10) GROUP PrefsTransGroup
> PUSHBUTTON  "NKJV" ID PrefsNkjvTransPb
>      AT (114 15 22 10) GROUP PrefsTransGroup
> PUSHBUTTON  "WEB" ID PrefsWebTransPb
>      AT (138 15 19 10) GROUP PrefsTransGroup
>
> --
> For information on using the PalmSource Developer Forums, or to
> unsubscribe, please see http://www.palmos.com/dev/support/forums/
>

-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to