creating controls dynamically  
Author Message
webb_er





PostPosted: Visual C# General, creating controls dynamically Top

Hi,

I just started with this project where I need to create controls like listboxes and textboxes dynamically based on an xml input. Though this could be done quite easily by incrementally positioning the controls vertically, the issue comes in when the size of the window isn’t big enough to hold all controls.

So I was wonder if there’s a way to create a container that would hold the various controls and provide a scrolling feature when the window is unable to hold all controls I’ve been looking for a solution for days now and I haven’t had any leads. Any suggestions would be appreciated.

Thanks,



Visual C#14  
 
 
cverdon





PostPosted: Visual C# General, creating controls dynamically Top

Hi,

What you want is a Panel. The panels have the AutoScroll property that you can set to true, making the scrollbar appear if needed.

Charles


 
 
Prasant Swain





PostPosted: Visual C# General, creating controls dynamically Top

You can use panel or even you can set the auto scroll porperty of the form so the scroll bar appers if the added control exeeds the visible area.