*code reformat
*OnLayout changed to layout
*added widthColumnParameter to get number of columns automatically