B4J Library MarkRG - Dynamic RadioGroup CustomControl

Hi there

NB: Updated class on the second post

I'm working on a marking script app and thus have a need to have various questions with marks allocated to them that I can just select a mark for a user. I had earlier thought I could use a slider/rangeslider but this proved cumbersome after a while i.e. due to dragging etc.

marks.png


The example above shows what I current have. This uses the CLV with a RangeSlider that meets each questions mark allocation e.g. 0 minimum mark and 4 maximum mark. The RangeSliders are dynamic in such that the set max & min can be the same or different for any of the questions. There are about 8 tests with different mark allocations.

So I wanted something easier to work with, a RadioGroup that can follow the same principle, you feed it minimum and maximum mark that a learner can have and one can just select the mark allocation and process whatever needs to be processed with that mark. Then came MarkRG.

dynamicmarkrg.png


So what I will do now is just substitute my code where the slider is with the MarkRG control and no more sliding and the nice part is that it's just pure code no layouts used.

From the above example, 1st row:

MaxValue = 5 i.e. radiobutton end at 5
MinValue = 0 i.e. radiobutton start at zero
TickUnit = 1 i.e. the stepping like in for loop
Value = 0 i.e. selected radiobutton

You can Reset / Refresh each MarkRG content by passing it these values anytime. For Reset, specify the values whilst Refresh you pass them as variables.

Ta!!
 

Attachments

  • MarkRGSourceExample.zip
    3.4 KB · Views: 253
Last edited:
Top