PhAB - disable/enable a Button

bridged with qdn.public.photon
Post Reply
Polczer Eszter

PhAB - disable/enable a Button

Post by Polczer Eszter » Thu Nov 13, 2003 1:42 pm

Hi!

How can I disable and enable a button? I mean disable like this: the user
can not push that button.

Can somebody help me? I can't find that flag...

Thanks!

Eszter

Brian Edmond

Re: PhAB - disable/enable a Button

Post by Brian Edmond » Thu Nov 13, 2003 3:55 pm

You can set the Pt_ARG_FLAGS resource to Pt_BLOCKED. When blocked a
widget will not generate callbacks and not respond to events such as
press/release. YOu can also set Pt_GHOST if you want to button dimmed.

Disable:
PtSetResource(widget, Pt_ARG_FLAGS, Pt_BLOCKED, Pt_BLOCKED);

Enable
PtSetResource(widget, Pt_ARG_FLAGS, 0, Pt_BLOCKED);

brian

Polczer Eszter wrote:
Hi!

How can I disable and enable a button? I mean disable like this: the user
can not push that button.

Can somebody help me? I can't find that flag...

Thanks!

Eszter


Post Reply

Return to “qdn.public.photon”