The Problem
Docking a ListBox - either in a form or a panel - can be very frustrating for the first time round!
Create a new project, insert a ListBox to the form, then fill the bench of the ListBox.
Notice that when you resize the form the ListBox appears to undock itself from the bottom part of the form.
The Solution
The problem is caused by the ListBox trying to ensure that only the full articles can be seen - this is why ListBox shocks from one height to another when you resize the form. The solution is simply to tell you to forget that only whole articles. This is done by setting the property to false IntegralHeight
Once this is established you can resize the form to any size and the ListBox will always remain in the same distance from filling the bottom of the form.





0 comments:
Post a Comment