How to display a list of user objects

G

Guest

I am creating a Windows application using C# in .NET.
In one of the windows, I have to show a scrollable list of user objects.
Those user objects contain various controls themselves (textbox, buttons,
etc) and are all of the same type of user object - just showing different
data. In this case, each one is a "question" being presented that needs to be
answered, and the requirement is to be able to show all the questions for a
given "section" of questions on one window in a scrollable control.
What is the best "container" control to show those? That container needs to
be scrollable, and it too will be on a window with other controls. Ideally,
whateverthat container control is, it will allow me to dynamically hide/show
questions because there are "conditional" questions that don't show unless
their condition is met. Example, I may show questions 1, 2, 3. If the
response to question 1 is YES, then questions 1a, 1b, and 1c need to now
show. Otherwise, they don't show in the list of questions in the container.
I tried using a panel, but it requires me to calculate the X,Y for each
object before I add it. And if that "condition" is met, I'll have to re-do
the whole thing to get the questions in there in the proper order or monkey
around with the Locations property for all of them and insert between them.
Can anyone suggest the best container? Thanks.
 
K

Ken Dopierala Jr.

Hi,

I think what would benefit you the most is creating your user controls as
Windows Controls. Create a new project and choose the Windows Control
Library as the project. I'm a VB.Net programmer but if you inquire in the
C# newsgroup for links on tutorials you'll probably get a good response.
Good luck! Ken.
 
G

Guest

Complicated - but is the requirement. And it is a Windows Forms, desktop
appication - so aspx isn't an option. But thanks for the input.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top