PDA

View Full Version : Skin listbox component, transparent border


digitalpencil
09-05-2006, 11:18 AM
Heh guys,
Have been scouring the web for some time now in search of a way to skin the listbox component and specifically, either remove the listbox border or make it appear transparent. I have found that to skin the listbox, you need to first skin the UIscrollbar as desired (done that), and then use setStyle upon rectBorder.. how is this done?? and is there a way of making the border appear transparent?

I've been searching high and low, everywhere I can think of to answer this question but am pulling dead ends wherever i turn so any help is really appreciated.

Thanks in advance,
Dave

3pepe3
09-05-2006, 12:11 PM
well i'm not very sure if this can work.... but i think you need to create the listBox with actionscript
componentInstance.createClassObject(className, instanceName, depth, initObject)

Your skined component need to be in the library so when the script create the object it will be skined :confused:

and then you're going to be able to use something like that:

yourListBox.setStyle("borderStyle", "none");
yourListBox.move(780, 20);
yourListBox.setSize(115, 610);
....
....

well hope i was clear :rolleyes:

digitalpencil
09-05-2006, 12:21 PM
Hi, thanks for the reply!
Sorry.. i'm pretty new to all of this though..
componentInstance.createClassObject(List, my_list, 100, ??)
what are possible initObject paramaters?

Also, I have gathered from devnet, that when 'borderStyle' is set to 'none' this does not remove the border but sets it to a 'neutral grey'?? How is this avoided by creation via AS?
Thanks again.

digitalpencil
09-05-2006, 12:35 PM
it works, you are now officially my new favourite person! :D

Thanks again for all the help, have been trying to work this out for days now!

Long live 3pepe3!!

3pepe3
09-05-2006, 12:51 PM
jajajaja.... you welcome, just i'm going to add something:
you can create the objects like this:
list in the library
in first frame this:
this.createClassObject(mx.controls.List, "yourList", this.getNextHighestDepth());
yourList.setSize(150, 275);
yourList._x = 18;
yourList._y = 75;
yourList.setStyle("borderStyle", "none");
or you can create a very long script like this but with the same result:
this.createClassObject(mx.controls.List, "yourList", this.getNextHighestDepth(),{_x:18, _y:75});
yourList.setSize(150, 275);
yourList.setStyle("borderStyle", "none");
and glad your problem has been solved
:D