Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8718761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:37:34+00:00 2026-06-13T06:37:34+00:00

I am new to Titanium Studio. Need to set row height dynamically but, I

  • 0

I am new to Titanium Studio. Need to set row height dynamically but, I unable to set dynamic height in each row. Below is my code:

textArray contains 10 text paragraphs. each paragraph have different height.

var myTable = Ti.UI.createTableView({height:360, width: 306, top: 58, backgroundColor: '#FFFFFF',borderColor: '#C8C8C8',borderWidth:2, zIndex: -1});
var myArray = [];

for(int i = 0; i < 10; i++)
{

    var row = Ti.UI.createTableViewRow({contentHeight: 'auto', width: 320,top:0});

    var my = Ti.UI.createView({ top:10,width:300,height:'auto' });

    var myText = Ti.UI.createlLabel({text:textArray[i],width:50,height:'auto',left:10,top:5,borderRadius:4});

    my.add(myText);

    row.add(my);
    myArray.push(row);

}

How can i set row height dynamically.

Can any one help?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T06:37:35+00:00Added an answer on June 13, 2026 at 6:37 am

    I got the solution:

    specify your table rowHeight as auto.
    
    var myTable = Ti.UI.createTableView({height:400,rowHeight: 'auto', width: 312, top: 10,left:4, backgroundColor: '#FFFFFF',borderColor: '#C8C8C8',borderWidth:2, zIndex: -1});
    var myArray=[];   
    
    for(int i = 0; i < 10; i++)
    {
        //create row in table.
        var row = Ti.UI.createTableViewRow({height: 'auto', width: 310,top:10, selectionStyle : Titanium.UI.iPhone.TableViewCellSelectionStyle.NONE});
    
        //textArray contains 10 elements. i am using this in each loop..
        var myText = Ti.UI.createlLabel({text:textArray[i],width:50,height:50,left:10,top:5,borderRadius:4});
    
        //add like this what ever you want...
        row.add(myText);
    
        myArray.push(row);
    
    }
    
    //store in table
    myTable.data = myArray;
    
    //disply table.
    win.add(myTable);
    

    If height:’auto’ property is not working then use Ti.UI.SIZE

    I hope.. someone will use it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Titanium mobile as well as titanium studio, but have heard good
I am new to Titanium studio. I was working in X-code before this. I
I'm new to Iphone development. I've developed an application with Titanium Studio, but I
New programmer here, I am trying to understand and break down this code below
I am new to mobile development with Titanium Studio. I am developing an app
I am working with Titanium, my code looks like this: var currentData = new
I am new in android and working on titanium platform but not getting how
I'm dev an app into titanium mobile in javascript. The dynamic menu insert each
Below is the code for titanium: var request = Titanium.Network.createHTTPClient(); request.open(POST, bh.serverAddress + MyCareer.svc/PostMessage/+
I'm new to Titanium Studio. I would like to create a Textfield without border

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.