Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Customize List Component.

Status
Not open for further replies.

fireburner69

Programmer
Aug 22, 2002
108
0
0
GR
Hello,
I am trying to customize a list component and I really cannot do that.
My problem is that I have figure out that in some cases I can modify some setting of the comp and in others I cannot.
What I want to do is 4 things:
1. Set the background color of the comp to undefined or false so that it can be transparent.
2. Change the color of the scrollbar again to undefined or false.
3.Change the font size
4.Change the font weight.

Whan I am trying to do the last two it's easy enough:
list_comp.setStyle("fontWeight", "bold");
list_comp.setStyle("fontSize", "40");

*Where list_comp is the name of the list Component.

That is working 100% fine.

But in the case where I am trying to set up the bgcolor like that is not working:
list_comp.setStyle("backgroundColor", "false");

the same pro comes up when I am trying to change the scrollbar color.

After searching some days now I have found out this code that can do the work but again with some pros.

import mx.styles.CSSStyleDeclaration;
if (_global.styles.List == undefined) {
_global.styles.List = new CSSStyleDeclaration();
}
_global.styles.List.setStyle("backgroundColor", false);
_global.styles.List.setStyle("borderStyle", "none");

this will do the work but cause I am recreating the style of the list I am loosing all the extra info that has with the select and other stuff and the component does not work.

After some tracing I have seen that the Style is not defined in the begining!? Why is that? I mean I am using the list comp in the begining of the movie what is the problem?


And another problem is again with the textarea comp.

There I can modify the bgcolor but I can not modify the font size and the weight.?
'
What am I doing wrong?

Any good tutorials or tips about compo and customize ?

Thanks for your time!






 
most of things you want do do sound quite easy...however i dont understand them all...looks like you have some code with css for as2 and some for mx

first....is this the AS1 or AS2 component...

so please define the comps you are using as the answers are different

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top