# Columns in ComboBox Component

**URL:** https://forum.kirupa.com/t/columns-in-combobox-component/267176
**Category:** flash
**Created:** [July 29, 2008, 1:05pm UTC](https://forum.kirupa.com/t/columns-in-combobox-component/267176 "2008-07-29T13:05:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tolk](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/tolk/32/2496_2.png) [@tolk](https://forum.kirupa.com/u/tolk)
#### Post date: [July 29, 2008, 1:05pm UTC](https://forum.kirupa.com/t/columns-in-combobox-component/267176/1 "2008-07-29T13:05:13Z")

</div>

I’m trying to get distinct columns for objects in my combo box so that when you open it out it appears like such:

Item1Name Item1Score  
Item2Name Item2Score  
Item3Name Item3Score  
and so on…

The combobox is populated by objects consisting of a name and score property.  
At the moment i’m using the combobox labelFunction() method to add tabspaces between the two properties. This works somewhat apart from the names vary in number of characters greatly (to a maximum of 26) so although I achieve columns they do not all align correctly:

Item1NameLong Item1Score  
Item2Name Item2Score  
Item3Name Item3Score  
and so on…

I’ve tried a few other cheap methods around this; like checking the lengths of the strings which doesnt work due to characters of different sizes (upper and lower case…).

I noticed that you can access the comboBox textField property so I also tried to define my own tabStops using a textFormat property and applying it to the textField but I couldn’t get this to work - I may have been doing it wrong though.

Anyone got any suggestions?? Thanks
