This problem may have been addressed elsewhere in the forums, but I am not really sure what to search for so please bare with me if this has been answered...
I have a View that I have created, and I am appending a Label as a child element to this view then appending that to the window... Problem is, if I do NOT set a height for my view, then nothing shows at all. This is all well and good for labels that have a set amount of characters but mine change ALL the time because they are dynamically pulled from a database. I want to know how to make a view grow with my text... Is this possible ?
Here is my code, as you can see it's SUPER simple:
// Create Whitespace View for TABS var tab_ws = Ti.UI.createView({ backgroundColor : '#FFF', top : 316 }); var label = Ti.UI.createLabel({ top : 10, left : 10, right : 10, text : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ac convallis dolor. Nunc sagittis facilisis turpis in fringilla. Aenean venenatis sapien elit. Sed justo felis, viverra sed consectetur et, dignissim sit amet urna. Vestibulum pellentesque enim ut sem placerat sed placerat mauris cursus. Pellentesque ut ante erat. Morbi at mi eu enim cursus eleifend quis a nulla. Morbi tellus turpis, faucibus eu congue vel, congue id sapien. Etiam consequat viverra nisl non lacinia. Etiam eleifend commodo libero quis aliquam. Vivamus interdum diam venenatis quam pharetra tincidunt. Vivamus purus ipsum, consequat eu accumsan vel, porttitor luctus nulla. Morbi metus neque, fringilla non convallis quis, semper tristique diam. Proin volutpat aliquet magna vitae dapibus. Duis convallis auctor ligula. Fusce et mollis ligula. Fusce eget sapien sed mi vehicula pharetra.', font : {'fontSize' : 12} });