Eventloop without gadgetid

Windows specific forum
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Eventloop without gadgetid

Post 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") 
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Eventloop without gadgetid

Post 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

:)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post 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 ?
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1285
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post by Paul »

Just as using a Constant is your Gadget ID, when using #PB_Any the return result becomes your Gadget ID.
Image Image
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post by Hroudtwolf »

:D Thanx @ both

Its works !
Post Reply