This is a general purpose function to do that for any gadget, I use it all the time:
; Puts a gadget in the centre of its group Function CentreGadget(G) CX = ClientWidth(GadgetGroup(G)) / 2 : CY = ClientHeight(GadgetGroup(G)) / 2 SetGadgetShape G, CX - (GadgetWidth(G)/2), CY - (GadgetHeight(G)/2), GadgetWidth(G), GadgetHeight(G) End Function