I have a problem with ScrollControlIn toView() in .NET 2.0:
I have a UserControl that holds a Panel which is set to AutoScroll. To this panel, I add a list of Controls so the panel needs to scroll. This is done in a for loop with custom positioning logic (basically this: start at int _top = 0, set the Top property of the current control to _top, add to _top the Height of the current control).
I finish this method (the one that the adding takes place in) with a ScrollControlIn toView(myContro l) call.
The problem is that when the control to scroll to is at the end of the list, my entire contents are not aligned to the top of the panel anymore. It appears to me that the adding and control positioning code is not yet finally executed/rendered/what ever when I reach ScrollControlIn toView.
Help on this issue would be very much appreciated.
I have a UserControl that holds a Panel which is set to AutoScroll. To this panel, I add a list of Controls so the panel needs to scroll. This is done in a for loop with custom positioning logic (basically this: start at int _top = 0, set the Top property of the current control to _top, add to _top the Height of the current control).
I finish this method (the one that the adding takes place in) with a ScrollControlIn toView(myContro l) call.
The problem is that when the control to scroll to is at the end of the list, my entire contents are not aligned to the top of the panel anymore. It appears to me that the adding and control positioning code is not yet finally executed/rendered/what ever when I reach ScrollControlIn toView.
Help on this issue would be very much appreciated.