Automatically adjust dialog boxes