Page 1 of 1

Eventloop without gadgetid

Posted: Fri Mar 04, 2005 1:41 am
by Hroudtwolf
I've create an dynamic gadget with #pb_any. Now i want to make an eventloop for this gadget. How to compare if this gadget was pressed or not?
'Cause i've no ID from this gadget.
Without ID..I can't make a eventloop.
Do anyone knows a way with API-Orders ?
Or is there a way to get the ID from this gadget?

Code:

Code: Select all

hButton.l=ButtonGadget (#pb_any,120,50,60,20,"OK") 

Re: Eventloop without gadgetid

Posted: Fri Mar 04, 2005 2:04 am
by PB
> How to compare if this gadget was pressed or not?
> 'Cause i've no ID from this gadget.

It actually uses a different ID, see here for my explanation:

viewtopic.php?t=12072

:)

Posted: Fri Mar 04, 2005 2:21 am
by Hroudtwolf
Hey...Thank you very much....

Image




But , now i have nearly the same problem with "ProgressBarGadget"

Code: Select all

hProgress.l=ProgressBarGadget (#pb_any,10,20,280,20,0,100)
How to set the current progress without ID ?

Posted: Fri Mar 04, 2005 4:41 am
by Paul
Just as using a Constant is your Gadget ID, when using #PB_Any the return result becomes your Gadget ID.

Posted: Fri Mar 04, 2005 8:43 am
by blueznl

Posted: Fri Mar 04, 2005 11:00 am
by Hroudtwolf
:D Thanx @ both

Its works !