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);
}
Your Answer
Think you can help? Login to answer this question!