|
-
Feb 3rd, 2008, 10:00 PM
#1
Thread Starter
New Member
[02/03] need advice, dev-ing a screening test for an HR dep
VB.NET 2003, Framework 1.1
I am currently developing a screening test for a Human Resources department, using VB.NET. It has 109 questions and users answer either True or False to all q's and the program creates a report file afterwards.
I've already designed the app and it is working, but not in the way I initially wanted. Currently the questions are displayed one-by-one and users click either a True or False button underneath the question. This works, but users can't go back to previous questions and only one question appears onscreen at any given time.
I originally wanted it to be like html forms, every question is displayed and underneath each one are two radio buttons (T or F). Users can use scroll bars to nav to prev questions. But I don't know how to do this. I cannot display radio buttons inside textboxes, or listboxes. There must be a way to do this. Internet Explorer's Options page displays checkboxes and radio buttons next to a long list of options.
An idea I got was building a custom browser (using AxWebBrowser1) that would open an html file which has all the questions in it. But that seems really wasteful since I don't need a fully functional browser. Besides I don't know how to make the javascript interact with vb.net code (so that it can generate the report, a text file).
If anyone has any practical ideas please help. Thank you so much.
-
Feb 3rd, 2008, 10:19 PM
#2
Re: [02/03] need advice, dev-ing a screening test for an HR dep
You just need a Label to display each question and two RadioButtons for each answer. The logical way to go would be to create a UserControl with a property you set for the question text and a property you get for the answer. You then just add as many of these UserControls to your form as you need, setting the question text of each one.
-
Feb 3rd, 2008, 11:32 PM
#3
Thread Starter
New Member
Re: [02/03] need advice, dev-ing a screening test for an HR dep
Thanks for your advice. I'm going to try it out. I might have to place all 109 of them on the form manually, though, because, if I use a loop to place them on the form, I don't know how to dynamically and accurately change the size of the user control and the contents (label) depending on the length of the question. Making them constant sized will make it look strange when the question is really short. Do you have any ideas? Thanks so much.
Last edited by _dpk_; Feb 4th, 2008 at 12:03 AM.
-
Feb 3rd, 2008, 11:59 PM
#4
Re: [02/03] need advice, dev-ing a screening test for an HR dep
It depends how and when you are getting the data. Do you know exactly what questions are going to be asked at design time? If so then you just add as many instances of your UserControl to your form as you needed and set their properties appropriately, e.g. Location and QuestionText. Note that QuestionText would be a property that you declared yourself.
If you are getting the question list at run-time then obviously you can't add the controls at design-time. In that case you'd get you question list from your database, text file or wherever, then loop through the list and add a UserControl instance for each one. Each time you created a control you'd set its Location and QuestionText and then add it to the form. Obviously the Location of each control would depend on the Size of the previous control. You'd take the Bottom of the previous control, add a margin and that would be the Top of the next.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|