Here is a sample that will do what you want. You can still get a single scroll bar occasionally when you really skew the viewport dimensions, but for the most part, this does the best job of utilizing the available space. Not sure why your code does not do it, like I said before, you have a lot of...