0
votes

I need to create a check box in my app. So for the same reason I have installed the native check box widget from the following link http://gitt.io/component/checkbox

After installation when I run my app, the result is as follows,

enter image description here

But I need to show the options for the check box. But i am not able to add the option label text for the check boxes. Can any one help me how to add the options text for check box.

I need the output similar to as follows,

enter image description here

Please help me how do do that. Or any other best alternatives.Please..

1
Could you please provide some code? It is hard to figure out whats wrong if we dont know what you are doing.Robin Ellerkmann
I have added a widget from the following link, github.com/jbeuckm/AlloyCheckbox I didn't modified any thingVinod
Try to add a label component to your program which is independent from the checkbox.Robin Ellerkmann
Yes I have added the external label but it is not coming side to check box. It is coming below the check box ( Next line) But I need to use the property layout: 'vertical', So how can I adjust the label side to the check boxVinod

1 Answers

1
votes

I guess what you need is a view element which contains the checkBox and the corresponding label. Like this:

<View id="yourOuterView" layout="vertical">
    <!-- other stuff -->
    <View id="checkBoxContainerView" layout="horizontal">
        <CheckBox />
        <Label id="yourLabel" />
    </View>
</View>

Please use your Checkbox code properly, I couldn't put it in because you did not provide any code. It is also possible to use an inner view without a layout by giving the checkBox and the label left/right attributes.