panel_bounds = function(col, row) local panel_width = (App.screen.width - Margin * (Num_panels_horizontal + 1)) / Num_panels_horizontal local left = (col - 1) * (Margin + panel_width) + Margin local panel_height = (App.screen.height - Margin * (Num_panels_vertical[col]+1)) / Num_panels_vertical[col] local top = (row - 1) * (Margin + panel_height) + Margin return left,top, panel_width, panel_height end