Continued development.
Fixed ButtonPanel so it works with MDI applications.