# List Component - Auto-Adjust Horizontal Scroll

**URL:** <https://forum.kirupa.com/t/list-component-auto-adjust-horizontal-scroll/263817>\
**Category:** flash\
**Created:** [June 19, 2008, 2:12pm UTC](https://forum.kirupa.com/t/list-component-auto-adjust-horizontal-scroll/263817 "2008-06-19T14:12:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulcybulski](https://avatars.discourse-cdn.com/v4/letter/p/90db22/32.png) [@paulcybulski](https://forum.kirupa.com/u/paulcybulski)\
**Post date:** [June 19, 2008, 2:12pm UTC](https://forum.kirupa.com/t/list-component-auto-adjust-horizontal-scroll/263817/1 "2008-06-19T14:12:22Z")

</div>

I am trying to implement an auto adjust horizontal scroll in a list that changes based on the users choices…

I am currently adjusting the hscroll by checking the length of the string that makes up the label…this however doesn’t give me an accurate measurement when it comes to lower case and upper case letters…because two strings may be the same length but visually appear quite different in length…

each of the following strings has 10 characters

1234567890  
HHHHHHHHHH  
hhhhhhhhhh

So this is not a good way of doing this since the lower case strings fit in the list but yet are longer than my max char length and therefore enable the horizontal scroll…

Is there any way to get the width of the label or the pixel width of a string?
