PtToggleButton ?

Hi !
Wich resource should I change in PtToggleButton (using PtSetResource()
func.) to change state from ‘Unset’ to ‘Set’ ?
Or maybe should I do it in another way ?

Thanks !

JM

Hello Jan,

You can do this with the Pt_SET flag in the Pt_ARG_FLAGS resource.
For example if you want to set a label text to show if the flag is set or
not you could use something like the following.

unsigned long *flags;
PtGetResource( ABW_toggle, Pt_ARG_FLAGS, &flags, 0);
PtSetResource( ABW_label, Pt_ARG_TEXT_STRING, (*flags & Pt_SET) ? “Flag
is set”:“Flag not set”,0);

Regards,
Dave B.



“Jan Maria” <noemail@sorry.com> wrote in message
news:3F589419.5080605@sorry.com

Hi !
Wich resource should I change in PtToggleButton (using PtSetResource()
func.) to change state from ‘Unset’ to ‘Set’ ?
Or maybe should I do it in another way ?

Thanks !

JM

Thanks!

U¿ytkownik “Dave Boltz” <dboltz@qnx.com> napisa³ w wiadomo¶ci
news:bja9q0$fe2$1@nntp.qnx.com

Hello Jan,

You can do this with the Pt_SET flag in the Pt_ARG_FLAGS resource.
For example if you want to set a label text to show if the flag is set or
not you could use something like the following.

unsigned long *flags;
PtGetResource( ABW_toggle, Pt_ARG_FLAGS, &flags, 0);
PtSetResource( ABW_label, Pt_ARG_TEXT_STRING, (*flags & Pt_SET) ?
“Flag
is set”:“Flag not set”,0);

Regards,
Dave B.