setStyle MX->2004

This is how i would set a Style in MX.


globalStyleFormat.arrow = 0x333333;
globalStyleFormat.scrollTrack = 0xDDDDDD;
globalStyleFormat.highlight = 0xFFFFFF;
globalStyleFormat.highlight3D = 0x333333;
globalStyleFormat.darkshadow = 0x333333;
globalStyleFormat.shadow = 0xEEEEEE;
globalStyleFormat.face = 0xEEEEEE;
globalStyleFormat.textColor = 0x333333;
globalStyleFormat.margins = 0;

and then apply so:


sf = new FStyleFormat();
sf.addListener(myPane);

But let’s say i would like to do this in MX2004

Sould i do it thusly:


ScrollPaneInstanceName.setStyle(arrow, 0x333333);
ScrollPaneInstanceName.setStyle(scrollTrack, 0xDDDDDD);
ScrollPaneInstanceName.setStyle(highlight, 0xFFFFFF);
ScrollPaneInstanceName.setStyle(highlight3D, 0x333333);
ScrollPaneInstanceName.setStyle(darkshadow, 0x333333);
ScrollPaneInstanceName.setStyle(shadow, 0xEEEEEE);
ScrollPaneInstanceName.setStyle(face, 0xEEEEEE);
ScrollPaneInstanceName.setStyle(textColor, 0x333333);
ScrollPaneInstanceName.setStyle(margins, 0);

I think this should work.
exsept for the margins. I am not really sure if that should work.
will this work?

_global.style.ScrollPane.setStyle(…);

Perhaps that will help. Read the MX docs under Styling components.