use layout in matrixDialog