#PB_LastGadget
Posted: Fri Jan 03, 2014 2:08 am
It would be handy to have access to the last gadget defined.
Maybe already in the system somewhere.
I can think of many uses for (say) “#PB_LastGadget” including easy positioning of other gadgets.
You could define something like…
Global X,Y
Procedure Under()
Y=GadgetY(#PB_LastGadget)+GadgetHeight(#PB_LastGadget)+10
Endprocedure
Procedure RightSide()
X=GadgetX(#PB_LastGadget)+GadgetWidth(#PB_LastGadget)+10
Endprocedure
Openwindow(……..)
X=10 : Y=10
ListIconGadget(X,Y…..)
Under()
ButtonGadget(X,Y…..) : RightSide()
ButtonGadget(X,Y…..) : RightSide()
ButtonGadget(X,Y…..)
If I change the height of the ListIconGadget or want to move all the buttons a bit I only have to make minor changes as the gadgets are positioned relative to each other.
Cheers
Maybe already in the system somewhere.
I can think of many uses for (say) “#PB_LastGadget” including easy positioning of other gadgets.
You could define something like…
Global X,Y
Procedure Under()
Y=GadgetY(#PB_LastGadget)+GadgetHeight(#PB_LastGadget)+10
Endprocedure
Procedure RightSide()
X=GadgetX(#PB_LastGadget)+GadgetWidth(#PB_LastGadget)+10
Endprocedure
Openwindow(……..)
X=10 : Y=10
ListIconGadget(X,Y…..)
Under()
ButtonGadget(X,Y…..) : RightSide()
ButtonGadget(X,Y…..) : RightSide()
ButtonGadget(X,Y…..)
If I change the height of the ListIconGadget or want to move all the buttons a bit I only have to make minor changes as the gadgets are positioned relative to each other.
Cheers