Initializing one of PtToggleButtons in a group

I have 3 radio buttons in an exclusive relationship within a group
built using PhAB. Each one has a unique number in its User Data so
when the group callback occurs, the response code can sort out which
button was selected. (This follows the Helpviewer recommendation and
works fine.)

Next challenge: when the button group’s parent dialog pops up, one of
the buttons should be Pt_SET according to a local variable. Hmmmm.
How do I do that? The buttons seem to have no ABW_xxxx identity …
or is it masked by the group identity.

Possibility: when the dialog properties are being set prior to
realization, perform an “ungroup” action, set the correct button,
then “regroup” the collection? Sounds crazy.

Other ideas anyone?

If you gave names to your buttons in PhAB – they should have the ABW_…
manifests declared for you.
Please make sure that you do give them names.
The best place to set the defaults for any widgets in a dialog would be in
the setup function (Pre-Realize) of this dialog:
in PhAB: Project–>Internal Links–> Choose your dialog → add a setup
function.

Regards,
-Misha.

“rlb” <robert.bottemiller@fmcti-dot-com.no-spam.invalid> wrote in message
news:dr6lm0$4jj$1@inn.qnx.com

I have 3 radio buttons in an exclusive relationship within a group
built using PhAB. Each one has a unique number in its User Data so
when the group callback occurs, the response code can sort out which
button was selected. (This follows the Helpviewer recommendation and
works fine.)

Next challenge: when the button group’s parent dialog pops up, one of
the buttons should be Pt_SET according to a local variable. Hmmmm.
How do I do that? The buttons seem to have no ABW_xxxx identity …
or is it masked by the group identity.

Possibility: when the dialog properties are being set prior to
realization, perform an “ungroup” action, set the correct button,
then “regroup” the collection? Sounds crazy.

Other ideas anyone?

“Misha Nefedov” <mnefedov@qnx.com> wrote in message
news:dr7uap$20q$1@inn.qnx.com

in PhAB: Project–>Internal Links–> Choose your dialog → add a setup
function.

That’s when you call ApCreateModule() from your code to open the dialog; if
the dialog is linked directly to a widget’s callback in PhAB, you’ll need to
click on that widget, select the callback, and specify the setup function
there.

Misha said:
If you gave names to your buttons in PhAB – they should have the
ABW_…
manifests declared for you. Please make sure that you do give them
names.

And Wojtech clarified:
if the dialog is linked directly to a widget’s callback in PhAB,
you’ll need to
click on that widget, select the callback, and specify the setup
function
there.

Actually I had done both… But in struggling towards success I had
grouped, ungrouped, regrouped (etc.) the buttons and eventually lost
registration of the callback in the button widget linked to the
dialog with the radio buttons. It took me a while to discover the
loss. (Is there any way to electronically deliver a dope-slap upside
the head?)

Thanks for your comments.