A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Setting the format for a userlist component

  1. #1
    Senior Member
    Join Date
    Jan 2007
    Location
    Barcelona
    Posts
    389

    Setting the format for a userlist component

    Hi,

    I probably deleted something from the Core Assets folder working in my project and my userlist doesn't show the selectable rectangle around the names anymore.

    I would also like to change the format of the userlist box text and can't get setStyle to work. Would that be the way to change it?

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi Cap,

    OK, drag a list component on to the stage and call it "listBox"

    then use this code and mess around with it
    PHP Code:
    listBox.setStyle("backgroundColor","0xEAEAEA");
    listBox.setStyle("fontFamily","Arial");
    listBox.setStyle("fontSize",20);
    listBox.setStyle("rollOverColor","0xDDDDDD");
    listBox.setStyle("selectionColor","0xAAAAAA");
    listBox.setStyle("textSelectedColor","0xFFFFFF");
    listBox.setStyle("textRollOverColor","0xFFFFFF");
    listBox.setStyle("selectionDuration",0);
    listBox.setStyle("borderStyle","solid");
    listBox.setStyle("borderColor","0x999999");
    listBox.setStyle("themeColor","0x999999");
    listBox.rowHeight 30;
    listBox.rowCount 5;

    var array:Array = new Array(
    "Aardvark""Buzzard""Caterpillar""Duck""Elephant""Frog""Giraffe");

    for (var 
    n:Number 0< array.lengthn++)
    {
        
    listBox.addItem({label:array[n], data:array[n]});

    There are other bits you can stylise if you look around the web too.

    Not sure why your other problem is happening

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center