#lang scheme/gui
(require (planet williams/table-panel/table-panel))
(define frame
(instantiate frame%
("Test")))
(define table-panel
(instantiate table-panel%
(frame)
(alignment '(center center))
(dimensions '(2 2))))
(for ((i (in-range 4)))
(let ((child (instantiate table-panel%
(table-panel)
(style '(border))
(dimensions '(4 3))
(column-stretchability (if (memq i '(0 1)) #t #f))
(row-stretchability (if (memq i '(0 2)) #t #f)))))
(for ((j '(1 2 3
4 5 6
7 8 9
* 0 \#)))
(instantiate button%
((format "~a" j) child)
(stretchable-width #t)
(stretchable-height #t)
(callback
(lambda (button event)
(printf "~a~n" (send button get-label))))))))
(send frame show #t)