Create an Account!

Adobe Flash Community Forum for all your Flash, Actionscript and Swift3D Support

Search:
FlashDevils Community
 Recommend Us
 About FlashDevils Community
 Can i become a moderator?
 How do i add Flash to my post?
 
Flash Community Register Flash Forum Control Panel Calendar Member List FAQ Search FLA Files
FlashDevils Community FlashDevils Community > Board > Flash > Flash ActionScript > Horizontal Scroll in List Component?


  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
paulcybulski
Young Devil

Registered: Nov 2007
Local time: 11:04 PM
Location:
Posts: 173

Horizontal Scroll in List Component?Post #1

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?

__________________
Paulskiiiiiiiiii



Report this post to a moderator | IP: Logged

Old Post 01-29-2008 08:23 PM
paulcybulski is offline Click Here to See the Profile for paulcybulski Click here to Send paulcybulski a Private Message Click Here to Email paulcybulski Find more posts by paulcybulski Add paulcybulski to your buddy list Edit/Delete Message Reply w/Quote
paulcybulski
Young Devil

Registered: Nov 2007
Local time: 11:04 PM
Location:
Posts: 173

Post #2

Solution:

ActionScript:
my_list.hScrollPolicy = "on";




...I should have googled!

__________________
Paulskiiiiiiiiii



Report this post to a moderator | IP: Logged

Old Post 01-29-2008 10:31 PM
paulcybulski is offline Click Here to See the Profile for paulcybulski Click here to Send paulcybulski a Private Message Click Here to Email paulcybulski Find more posts by paulcybulski Add paulcybulski to your buddy list Edit/Delete Message Reply w/Quote
Chosen
Young Devil

Registered: Dec 2007
Local time: 06:04 AM
Location: The Netherlands, The Hague
Posts: 129

Post #3

haha good for you dude , see that google is your friend.

Chosen!



Report this post to a moderator | IP: Logged

Old Post 01-30-2008 08:09 AM
Chosen is offline Click Here to See the Profile for Chosen Click here to Send Chosen a Private Message Click Here to Email Chosen Find more posts by Chosen Add Chosen to your buddy list Edit/Delete Message Reply w/Quote
paulcybulski
Young Devil

Registered: Nov 2007
Local time: 11:04 PM
Location:
Posts: 173

Post #4

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??

__________________
Paulskiiiiiiiiii



Report this post to a moderator | IP: Logged

Old Post 01-30-2008 03:30 PM
paulcybulski is offline Click Here to See the Profile for paulcybulski Click here to Send paulcybulski a Private Message Click Here to Email paulcybulski Find more posts by paulcybulski Add paulcybulski to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 05:04 AM. Post New Thread    Post A Reply
  Last Thread   Next Thread
Advertising
Show Printable Version | Email this Page | Unsubscribe from this thread | Download thread

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

< FlashDevils - Terms of use >

Copyright, FlashDevils Community, 2002 -
Flash Archive

Links
Books