Restored from previous forum. Originally posted by Franco.
Originally posted by Kale
say for example i do this:
MyStringGadget = StringGadget(#PB_Any, 0, 0, 30, 11, "Test")
then later in my code i wanted to get the string entered in this gadget would i use this?:
String$ = GetGadgetText(MyStringGadget)
is that how you are planning it?
--Kale
New to PureBasic and falling in Love!
Yes I suppose, because the Result (MyStringGadget) of:
Code: Select all
MyStringGadget = StringGadget(#PB_Any, 0, 0, 30, 11, "Test")
is not the WinOS Object Handle it should be the PureBasic internal Gadget number.
You can retrieve every handle with:
Code: Select all
GadgetID(MyStringGadget) ; GadgetID is already there...
The only thing is, that old code that uses:
Code: Select all
MyStringGadgetHANDLE = StringGadget(1, 0, 0, 30, 11, "Test")
MyWinAPIcommand_(MyStringGadgetHANDLE)
doesn't work anymore. You have to add:
Code: Select all
MyWinAPIcommand_(GadgetID(MyStringGadgetHANDLE));MyStringGadgetHANDLE is not the WinOS handle anymore
But it's not a big deal, isn't it?...
Have a nice day...
Franco