LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Beginner formatting question!

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!

Download All
0 Kudos
Message 1 of 5
(2,362 Views)

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....

2019-11-05_11-59-24.png

 

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. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 5
(2,337 Views)

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.

0 Kudos
Message 3 of 5
(2,323 Views)

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.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 4 of 5
(2,320 Views)
0 Kudos
Message 5 of 5
(2,319 Views)