Make height of widget browser preferred dynamically

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.

Hi,

I make browser widget programmatically.

my question is, how i can set the height of the browser preferred (based on the url request).

let faqBrowser = new kony.ui.Browser({

"centerX": "50%",

"height": "preferred",

"id": "faqBrowser",

"isVisible": true,

"width": "100%",

"zIndex": 1

}, {}, {

"baseURL": "https://www.google.com/",

"browserType": constants.BROWSER_TYPE_UIWEBVIEW

});

faqBrowser.requestURLConfig = {

URL: "https://www.facebook.com/",

requestMethod: constants.BROWSER_REQUEST_METHOD_GET

};

this.view.flxFaq.add(faqBrowser);

Hi @Neil Bviley​

You have to use "height":"kony.flex.USE_PREFERED_SIZE" to set the preferred height for the dynamically created widgets.