This content has been marked as final. Show 5 replies
(Assuming you are using a v2 component)
Because the ComboBox class inherits from the List class, you should be able to use the List class hScrollPolicy property to turn on horizontal scroll, which is off by default. However, the scrollbar does not measure text, so you'll have to manually set the maxHPosition manually, as per the Flash 8 Help Docs.
Thanks u so much for your reply.i have used this code in my application but it is still not working.
is there any other way?
Actually, you're right it's not that simple. Looking back on a project of mine which used this, fortunately there is a solution.
First, a ComboBox is a List and a Label component put together. You can actually access the List component instance inside the ComboBox through the dropdown property. From there you can configure the list's hScrollPolicy.
But there's a catch: when you set the hScrollPolicy to "on", the vScrollPolicy sets itself to "auto. So you need to explicitly turn it off so you don't get vertical scrollbars:
And, after a bit of digging, I found my hack for setting the maxHPosition according to the length of the widest text within the List:
Thank you so much for your reply.now horizontal scrollbar is visible in my combo box.