11-05-2019 11:21 AM
Good Afternoon,
Im messing around trying to make a multiple choice test. Im trying to get the question to format correctly in the string so that the answers are displayed under one another not in a constant string. I eventually want these questions/answers to change often, so I dont think the string length or subset would be best. Im sure there is a more efficient way to do this, but im just getting my feet wet.
I have attached the VI, as well as the .txt file with some generic questions and the formatting i am looking to have displayed. Thank you in advance!
11-05-2019 12:00 PM
Unfortunately, I can't open your VI. But going off your description, it sounds like you want to use an array of disabled string controls. If you want to control spacing between the questions, you might use an array of clusters with a disabled string control (turn off Autosizing on the cluster to add space between questions). If you don't want the borders, use the classic controls and set the control colors to transparent. Something like this....
The advantage of using the cluster method is you can add other controls for the answer box, whether it be a text box for a short answer question or a radio button control for multiple choice.
The only caveat, that I can think of at the moment, for using an array control is that every question will have the same appearance, only the data will be different. So if you have some multiple choice questions and some short answer questions, that may be difficult to accomplish using this method.
11-05-2019 12:14 PM
Let me try and post a screen shot of the VI! I only want one question to appear at a time which is how i have it setup currently. when they click the button, it records and the next string appears to answer.
11-05-2019 12:19 PM
You can still use the array method. Just need to only show one array index on the screen and when the user submits their answer, set the index value of the array to the next question number.
11-05-2019 12:20 PM
here 🙂