Page 1 of 1

SB 2.00 b2 Return value of AddGadgetItem

Posted: Wed Nov 02, 2016 2:36 pm
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")

Re: SB 2.00 b2 Return value of AddGadgetItem

Posted: Wed Nov 02, 2016 3:11 pm
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

Re: SB 2.00 b2 Return value of AddGadgetItem

Posted: Fri Nov 04, 2016 8:19 am
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.