Wolfram Technology Guide: Symbolic Interface Construction  previous | next 
Programmatically Create Any Arrangement of Controls
Mathematica makes it easy to lay out controls in any arrangement, mixing in arbitrary graphics and typesetting. This shows an array of buttons for pasting images.
In[1]:=

Click for copyable input
Grid[ Table[

  If[! CoprimeQ[i, j], Null, 

   PasteButton[

    Show[KnotData[{"TorusKnot", {i, j}}], ImageSize -> {70}], 

    Background -> LightGray]], {i, 5}, {j, 5}]]
Out[1]=