469,592 Members | 1,900 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,592 developers. It's quick & easy.

How to display a list of user objects

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.
Nov 22 '05 #1
3 2119
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.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"RCCNH" <RC***@discussions.microsoft.com> wrote in message
news:05**********************************@microsof t.com...
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.

Nov 22 '05 #2
that seems complicated, i think the best container is an aspx page..

"RCCNH" wrote:
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.

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

"[Alan Flores]" wrote:
that seems complicated, i think the best container is an aspx page..

"RCCNH" wrote:
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.

Nov 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by RCCNH | last post: by
3 posts views Thread by Iain Hallam | last post: by
5 posts views Thread by Little | last post: by
2 posts views Thread by Rob Banfield | last post: by
10 posts views Thread by Jeff Williams | last post: by
1 post views Thread by =?Utf-8?B?Q2hhcmxlcw==?= | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.