LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-29-2008, 08:20 PM
paulcybulski's Avatar
paulcybulski paulcybulski is offline
Registered User
 
Join Date: Nov 2007
Posts: 146
Rep Power: 6
paulcybulski is on a distinguished road
Is there an option to turn on the horizontal scroll for the list component? I have some list entries that are longer than the list is wide, so they get cut off at the end...can this be done?

Solution:

Actionscript:
my_list.hScrollPolicy = "on";

...I should have googled!

it was brought to my attention that I was misssing a key element to get that function to work...

Actionscript:
theList.maxHPosition = 100;

I took it one step further...I put in a condition which checks the lengths of the list elements, and the width is only as wide as the longest entry...

Im actually populating my list from an XML so the code is geared toward that...

Actionscript:
var listWidth:Number;

ExList.onLoad = function()
{
        var nodes = this.firstChild.childNodes;
    numOfItems = nodes.length;
    listWidth = nodes[0].attributes.ex_name.length;//here we assign the first array element as the highest width to start...
    for(var i=0; i<numOfItems; i++)
    {
                .
                .
                .
        exList.addItem({label:_global.exName[i], data:_global.boothID[i]});//list item added
        if(nodes[i].attributes.ex_name.length > listWidth)//checks to see if current list item is longer than the max up to this point
        {
            listWidth = nodes[i].attributes.ex_name.length;//if the current item is higher than the previous max, make the current item the max
        }
    }
   exList.hScrollPolicy = "on";//turn on the horizontal scroll bar 
   exList.maxHPosition = listWidth;//set the width of the list element(max horizontal scroll) to the widest element in the list
}
ExList.load("blah.xml");

eh??

Last edited by [PAUL FERRIE] : 01-30-2008 at 05:18 PM
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
List Component - Auto-Adjust Horizontal Scroll paulcybulski Actionscript 2.0 0 06-19-2008 02:08 PM
Dynamically Coloured Icons For List Component tristian Actionscript 1 Components 0 12-11-2006 04:15 PM
MP3 Player using List Component and XML Playlist dogandking Flash MX 2004 0 12-05-2006 06:41 PM
scroll bar component dirk Flash MX 2004 6 12-16-2005 12:50 PM
displaying list component title scooter Flash Components v0 2 10-20-2005 07:38 PM




All times are GMT. The time now is 12:12 PM.