Table at bottom of window - only small area visible & scrollable

You must Login before you can answer or comment on any questions.

I've got a window (layout vertical) with some labels at the top, one of which is a description which varies in length. Sometimes this length is such that the table located below it, is only visible for maybe 1/5 to 1/8 of the screen. This table is scrollable of course, but that means on the 1/8 of the table is scrollable and visible meaning users can only see a tiny portion of the table at a time. I'd love it if I could scroll the window down to see more of the table. Blow is the code:

cf.search.resultsWin = Ti.UI.createWindow({ title: course.THECRS+' '+course.CRN, backgroundColor: '#e6e6e6', layout: 'vertical', backButtonTitle: 'Back', rightNavButton: editButton }); var title = Ti.UI.createLabel({ text: course.TITLE, color: '#464646', top: 10, height: 20 }); var desc = Ti.UI.createLabel({ text: course.COURSEDESCRIPTION, color: '#464646', font: { fontSize: 12 }, top: 10, }); var details = Ti.UI.createTableViewSection({headerTitle: 'Course Details'}); var detailsData = []; var crn = Ti.UI.createTableViewRow({ title: 'CRN: '+course.CRN, height: 40 }); details.add(crn); var semester = Ti.UI.createTableViewRow({ title: 'Sem: '+course.SEMESTERTITLE, height: 40 }); details.add(semester); if (course.CATEGORY_ABREV != 'ol' && course.CATEGORY_ABREV != 'is'){ var days = Ti.UI.createTableViewRow({ title: 'Days: '+course.DAYDESC, height: 40 }); details.add(days); var time = Ti.UI.createTableViewRow({ title: 'Times: '+String.formatTime(new Date(course.STARTTIME), 'short')+'-'+String.formatTime(new Date(course.ENDTIME), 'short'), height: 40 }); details.add(time); } if (course.CATEGORY_ABREV != 'is'){ dates = Ti.UI.createTableViewRow({ title: 'Dates: '+String.formatDate(new Date(course.STARTDATE), 'short')+'-'+String.formatDate(new Date(course.ENDDATE), 'short'), height: 40 }); details.add(dates); } var instructor = Ti.UI.createTableViewRow({ title: 'Instructor: '+course.LASTNAME+', '+course.FIRSTNAME, height: 40, email: course.EMAIL, hasChild: true }); instructor.addEventListener('click', function(){ var emailWindow = Ti.UI.createEmailDialog(); emailWindow.subject = 'Course Search'; emailWindow.toRecipients = this.EMAIL; emailWindow.open(); }); details.add(instructor); var credits = Ti.UI.createTableViewRow({ title: 'Credits: '+course.CREDITS, height: 40 }); details.add(credits); var table = Ti.UI.createTableView({ data: [details] }); cf.search.resultsWin.add(title); cf.search.resultsWin.add(desc); cf.search.resultsWin.add(table); cf.ApplicationTabs.activeTab.open(cf.search.resultsWin); }

— asked 1 year ago by Lee Bartelme
2 Comments
  • FYI I've tried setting it's height to no avail. I've also tried putting it inside other views and a few other things and just nothing. It's like the table won't be a height that extends beyond the constraints of the window.

    — commented 1 year ago by Lee Bartelme

  • I've also tried putting the table first.. When I put it first and set a height, the height takes but the content below the table... as it extends out of the window... cannot be scrolled to. Why are my windows not scrollable?

    — commented 1 year ago by Lee Bartelme

Your Answer

Think you can help? Login to answer this question!