Question: Scrollable area with multiple choice questions using radio buttons

Devin Asay devin_asay at byu.edu
Wed Apr 24 14:02:38 EDT 2013


On Apr 24, 2013, at 11:25 AM, Shawn Blc wrote:

> Devin, so using text fields isn't an option huh?  I'll check out DGs.

Sure, using text fields is always an option. It might require a little setup and scripting. Data Grids are actually groups composed of many objects and scripting that takes care of the housekeeping for you. They are very powerful and for some uses can be overkill for what you might need.

If all you want to do is to scroll through a group of fields and radio buttons it's not terribly difficult to do, especially if you know in advance exactly how many questions you will have. Try this:

Create several fields, one for each quiz question.

Align them top to bottom in a column, with left edges aligned.

Select all of the fields and group them. 

Resize the group to so that the bottom few fields are not visible. Now go to the group's Size and Position pane in the property inspector and lock the group's size.

Go back to the Basic pane and turn on the vertical scrollbar for the group.

Now you have a group of fields that you can scroll through. I think you'll see how easy it would be to also add radio buttons to this group, one set per field. In this case you'd want to first create groups of a question field and radio style answer buttons, group each question set, then clone the group to create other questions. Finally, group the question groups into a larger group that you can scroll as described above. 

I hope I'm not being either too basic or assuming too much about how much you know about LiveCode. Anyway, give it a try.

Devin


Devin Asay
Office of Digital Humanities
Brigham Young University





More information about the use-livecode mailing list