>>I must have killed the brain cell that contains this information.
>>
>>I have a form that on init instanciates a number of container classes inorder to display information. If the number of containers is greater than 5, the viewable area of the form is filled and the containers are placed outside of the viewable area. There are generally 8 to 10 containers. I want to enable the verticle scroll bar when the the height plus the top of the last instanciated container is greater than the height of the form.
>>
>>If I hard code the number of containers, it works, the scroll bar is displayed and works fine. If I do not, the scroll bar is not displayed.
>>
>>It has something to do with the need of the scroll bar is determined when the form is instanciated.
>>
>>Ideas?
>
>Fred,
>If you set scrollbars at design time then even if you add controls at run time (in init or later) scrollbars work. However there is a glitch even if the controls are there they're not seen till a sizing is done or they get focus.
>Cetin
Thank you, It turned out that I needed to do both a setfocus to the last container and a resize. Eitehr by itsself did not do the trick.
Fred Lauckner
You know, it works on my computer. I don't know what your problem is.
.Net aint so bad.