SB 2.00 b2 Return value of AddGadgetItem

Just starting out? Need help? Post your questions and find answers here.
cederavic
Posts: 30
Joined: Tue Feb 25, 2014 6:49 am

SB 2.00 b2 Return value of AddGadgetItem

Post by cederavic »

I'm not sure that's a bug because of the doc mentionning PB and not SB but :
Param Position : #PB_Any can be used, in which case the return-value will be the new number assigned by PB.
It always return undefined:

Code: Select all

OpenWindow(0, 0, 0, 200, 100, "")
    combo = ComboBoxGadget(#PB_Any, 10, 10, 180, 20)
    Debug AddGadgetItem(combo, 0, "t1")
    Debug AddGadgetItem(combo, 1, "t2")
    Debug AddGadgetItem(combo, -1, "t3")
    Debug AddGadgetItem(combo, #PB_Any, "t4")
User avatar
Peter
Posts: 1197
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: SB 2.00 b2 Return value of AddGadgetItem

Post by Peter »

AddGadgetItem() has no return value.

Code: Select all

OpenWindow(0, 0, 0, 200, 100, "")
    combo = ComboBoxGadget(#PB_Any, 10, 10, 180, 20)
    Debug combo
    AddGadgetItem(combo, 0, "t1")
    AddGadgetItem(combo, 1, "t2")
    AddGadgetItem(combo, -1, "t3")
    AddGadgetItem(combo, #PB_Any, "t4")
Greetings ... Peter
Fred
Site Admin
Posts: 1820
Joined: Mon Feb 24, 2014 10:51 am

Re: SB 2.00 b2 Return value of AddGadgetItem

Post by Fred »

in PB it's only valid for the MDI Gadget:

Code: Select all

For the MDIGadget() this parameter specifies the #Window number for the new MDI childwindow. #PB_Any can be used, in which case the return-value will be the new number assigned by PB. 
Post Reply