get correct pane number during creation