You don't have to manually calculate these things. Layout classes are designed for this purpose. Just set an appropriate layout for your widget and magically observe your child widgets get resized as your parent widget resizes. -- Ender EREL