Hi, Iam having a form in that i created 1 Flex scroll container. From Js coding Iam adding dynamically flex container and mapping as a child to scroll container in Js. But it is not working. Can you guide If i miss any thing here

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

function addWidgetsfrmFaq() {

var FlexContainer0792fb3abd60c42 = new kony.ui.FlexContainer({

"autogrowMode": kony.flex.AUTOGROW_NONE,

"clipBounds": true,

"height": "100dp",

"id": "FlexContainer0792fb3abd60c42",

"isVisible": true,

"layoutType": kony.flex.FREE_FORM,

"left": "0dp",

"skin": "CopyslFbox0aad222d41e7843",

"top": "43dp",

"width": "100.01%",

"zIndex": 1

}, {}, {});

FlexContainer0792fb3abd60c42.setDefaultUnit(kony.flex.DP);

var FlexContainer0e445975fc8c04c = new kony.ui.FlexContainer({

"autogrowMode": kony.flex.AUTOGROW_NONE,

"clipBounds": true,

"height": "50%",

"id": "FlexContainer0e445975fc8c04c",

"isVisible": true,

"layoutType": kony.flex.FREE_FORM,

"left": "0dp",

"skin": "CopyslFbox0ab06ae436a324f",

"top": "0dp",

"width": "100%",

"zIndex": 1

}, {}, {});

FlexContainer0e445975fc8c04c.setDefaultUnit(kony.flex.DP);

var Label01f1da48ee65c4f = new kony.ui.Label({

"height": "100%",

"id": "Label01f1da48ee65c4f",

"isVisible": true,

"left": "0dp",

"skin": "CopyslLabel0ccc3c0200c9c47",

"text": "Label",

"textStyle": {

"letterSpacing": 0,

"strikeThrough": false

},

"top": "0dp",

"width": "100%",

"zIndex": 1

}, {

"contentAlignment": constants.CONTENT_ALIGN_MIDDLE_LEFT,

"padding": [0, 0, 0, 0],

"paddingInPixel": false

}, {

"textCopyable": false

});

FlexContainer0e445975fc8c04c.add(Label01f1da48ee65c4f);

var FlexContainer03938e78bf3324f = new kony.ui.FlexContainer({

"autogrowMode": kony.flex.AUTOGROW_NONE,

"clipBounds": true,

"height": "50%",

"id": "FlexContainer03938e78bf3324f",

"isVisible": true,

"layoutType": kony.flex.FREE_FORM,

"left": "0dp",

"skin": "slFbox",

"top": "51dp",

"width": "100.01%",

"zIndex": 1

}, {}, {});

FlexContainer03938e78bf3324f.setDefaultUnit(kony.flex.DP);

var Label06ae00630365b49 = new kony.ui.Label({

"height": "100%",

"id": "Label06ae00630365b49",

"isVisible": true,

"left": "0dp",

"skin": "slLabel",

"text": "Label",

"textStyle": {

"letterSpacing": 0,

"strikeThrough": false

},

"top": "0dp",

"width": "100%",

"zIndex": 1

}, {

"contentAlignment": constants.CONTENT_ALIGN_MIDDLE_LEFT,

"padding": [0, 0, 0, 0],

"paddingInPixel": false

}, {

"textCopyable": false

});

FlexContainer03938e78bf3324f.add(Label06ae00630365b49);

FlexContainer0792fb3abd60c42.add(FlexContainer0e445975fc8c04c, FlexContainer03938e78bf3324f);

fmFaqs.FlexScrollContainer0b0fcc39b75354f.add(FlexContainer0792fb3abd60c42);

// fmFaqs.add(FlexScrollContainer0b0fcc39b75354f);

}

Hi,

Please find the attached sample app which is working as per your requirement.

Please review the same and let me know in case any issues.

Thanks.

Hi,

Iam using Visulaizer 7.2 i cannot able to import this.

Thanks for sharing.

Hi,

Please find the sample app developed in 7.2.1. Review the same and let me know in case any issues.

Thanks.

Hi,

Thanks for sharing. One info How to read selected flex index dynamically?

Hi,

Can you please provide more information on your query about flex Index.

Thanks.

@Advm Mvthis​

can you please help on deleting dynamically added flex container with in the flexscrollcontainer on button click.

Currently maintaining count flag while adding Flex container inside scroll container. Later Using remove at method to delete lastly added container with the help of count [i.e remove At(count) ]..Is this preferred approach?