PDA

View Full Version : FListBox tabstops


shawn_t
02-01-2005, 10:32 PM
Is there anyway to set the tabstops for individual FListBox items?

What I want to do is display a table of items in a FListBox. If I wanted to do this in a text box, it is simple using a TextFormat():

tf = new TextFormat();
tf.tabStops = [306,388,490];

textbox_txt.setNewTextFormat(tf);
textbox_txt.text = "column1\tcolumn2\tcolumn3";


However, I can't seem to find out how to do this with individual lines of text within an FListBox. I am using DataGlue.as and a binder routine to populate the listbox as follows:

getLanguagesReply.binder = function(record)
{
var dataObj = new Object();

dataObj.label = record.languageID + "\t" + record.languageLabel;
dataObj.data = record;

return dataObj;
}

so I just need some way to set the tabstops for the label. What are the members of dataObj in this binder?

shawn_t
02-02-2005, 12:51 AM
I stepped through the debugger and the FListBox has a member variable textStyle. The following code will set the tabstops for a FListBox:

listbox_lb.textStyle.tabStops = [306,388,390];