-
.:|8^)\ if I only had a brain!
*** PLEASE HELP!!! Changing colors of the UIScrollbar class?
Can anyone tell me how to change the colors on an instance of the UIScrollbar class? I do not want to change skins, just the colors.
I thought something like this would work, but it does not:
myScrollbar_sb.setStyle("scrollTrackColor", 0xFF0000);
PLEASE help!
-
In MX only...
Code:
// mcname.setStyleProperty("property",RGB Color in hex)
scrollbar1.setStyleProperty("arrow", 0x00FFFF);
scrollbar1.setStyleProperty("face", 0x000000);
scrollbar1.setStyleProperty("face", 0xFF0000);
scrollbar1.setStyleProperty("foregroundDisabled", 0x0000FF);
// or by using the FStyleFormat() where you can make store all the changes in this object and apply it any time you want like this
myFormat = new FStyleFormat();
myFormat.scrollTrack = 0xFF9900;
myFormat.arrow = 0xFF0000;
myFormat.face = 0x999999;
myFormat.darkshadow = 0xFF0000;
myFormat.shadow = 0x00FF00;
myFormat.highlight = 0x00FFFF;
myFormat.highlight3D = 0xFF00FF;
myFormat.foregroundDisabled = 0xFFFFFF; // for disabled scrollbar only!
// then you can apply it to Components like this
myFormat.addListener(scrollbar2); // add other instances like myFormat.addListener(scrollbar1,scrollbar2,scrollbar5);
-
.:|8^)\ if I only had a brain!
Re: In MX only...
Originally posted by oldnewbie
Code:
// mcname.setStyleProperty("property",RGB Color in hex)
scrollbar1.setStyleProperty("arrow", 0x00FFFF);
scrollbar1.setStyleProperty("face", 0x000000);
scrollbar1.setStyleProperty("face", 0xFF0000);
scrollbar1.setStyleProperty("foregroundDisabled", 0x0000FF);
// or by using the FStyleFormat() where you can make store all the changes in this object and apply it any time you want like this
myFormat = new FStyleFormat();
myFormat.scrollTrack = 0xFF9900;
myFormat.arrow = 0xFF0000;
myFormat.face = 0x999999;
myFormat.darkshadow = 0xFF0000;
myFormat.shadow = 0x00FF00;
myFormat.highlight = 0x00FFFF;
myFormat.highlight3D = 0xFF00FF;
myFormat.foregroundDisabled = 0xFFFFFF; // for disabled scrollbar only!
// then you can apply it to Components like this
myFormat.addListener(scrollbar2); // add other instances like myFormat.addListener(scrollbar1,scrollbar2,scrollbar5);
Thank you for your help. I tried that it it did not seem to work for me. Is your sample code for the UIScrollbar class or the FScrollBar component? I am looking for the solution for a UIScrollbar class instance. All I want to do is change the colors (not skins) and it seems so difficult
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|