Thanks for the advice. It works great. I'm a bit surprised though that
you have to do that. I thought for sure there must be a 'dock to the
visible boundaries' settings somewhere....
That would require that the control would be excluded from the normal
positioning of child controls and instead be placed outside the actual
parent control, changing the size of the scrolling area. That would in
turn mean that the parent control would need three sets of coordinates,
one for the original position of the control, one for the scrolling area
that is left when the docked childen has been placed, and one for the
virtual area that is shown in the scrolling area.
It think that it's more straight forward to actually place the control
outside the area that should scroll. :)
> Thanks for the advice. It works great. I'm a bit surprised though that
> you have to do that. I thought for sure there must be a 'dock to the
[quoted text clipped - 7 lines]
>>> do I keep that from happening? (Do I have to set the location of the
>>> menu with each scroll-bar move???).
bern11 - 14 Jun 2006 22:08 GMT
Those three sets of positions already exist:
Form.Location and Form.Size contain the visible bounds
Form.AutoScrollPosition.X and Form.AutoScrollPosition.Y indicate the
virtual area offset
Control.Position indicate where the control is. I could've made it
work by adding the AutoScrollPosition.X & Y to the control position to
move them every time scrolling occurred. I was expecting some type of
native method to accomplish the same (by docking the control to the
form.position). You're suggestion is easier than capturing scrollbar
events, so I'll go with that.
> That would require that the control would be excluded from the normal
> positioning of child controls and instead be placed outside the actual
[quoted text clipped - 18 lines]
>>>> do I keep that from happening? (Do I have to set the location of
>>>> the menu with each scroll-bar move???).