Easy Gadget Spacing
BlitzPlus Forums/BlitzPlus Programming/Easy Gadget Spacing
| ||
An easy way to position or reposition gadgets is to use a global variable and a function to increament it. Global glb_y Function IncY%(n) glb_y_value = glb_y_value + n If n=-1 Then glb_y_value=0 Return glb_y_value End Function ;Then when creating gadgets; gad1=createbutton("text",x,incY(h),w,h,wHand,style)gad2=createbutton("text",x,incY(h),w,h,wHand,style) gad3=createbutton("text",x+100,incY(0),w,h,wHand,style) ;gad2 can be position above gad1 just by cutting and pasting line ;2 above line 1. ;dosn't seem like much, but a great time saver when you have lots of gadgets and you need to rearrange things |