Important! A new Community experience launched on September 26, 2017. Read more about it here or continue to Base Camp.
Voting: 
Vote up!
0 Votes
1 Replies
Unanswered

Disabling Button with dynamic widget code .

Question asked by Bayan Siddiek on Feb 25, 2017 00:42 EST

Hello Experts ,  I have added one button in one flex by using dynamic widgets code below,   var btnCont = new kony.ui.Button({         "bottom": "0%",         "focusSkin": "sknbtnContUpsellActive",         "height": "8%",         "id": "btnContClass"+count,         "isVisible": true,         "left": "0%",         "skin": "sknbtnContUpsell",         "onClick" : onClickContinue_FindFlights,         "text": "Continue",         "width": "100%",         "setEnabled" : false,         "zIndex": 100     }, {         "contentAlignment": constants.CONTENT_ALIGN_CENTER,         "displayText": true,         "padding": [0, 0, 0, 0],         "paddingInPixel": false     }, {         "showProgressIndicator": true     });     flxBackground.add(flxFlightDetail, flxclassHeadr, flxFlight, btnCont);        Would you kindly advice how can I disable this button using above code , I tried “setEnabled” : false but it doesn’t work , is there any other property for this purpose ? i have also tried  frmFindFlights["btnCont"+flightindexNumber].setEnabled(false); but no luck !! Thanks   

Vote up!
0 votes
Vote down!

You should use the id to access your field so: frmFindFlights[btnContClass"+count].setEnabled(false);

Replied by: Feb 27, 2017 06:10 EST