# setStyle MX-\>2004

**URL:** <https://forum.kirupa.com/t/setstyle-mx-2004/93563>\
**Category:** Uncategorized\
**Created:** [November 1, 2003, 10:01pm UTC](https://forum.kirupa.com/t/setstyle-mx-2004/93563 "2003-11-01T22:01:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![T\_O](https://avatars.discourse-cdn.com/v4/letter/t/cc9497/32.png) [@T\_O](https://forum.kirupa.com/u/T_O)\
**Post date:** [November 1, 2003, 10:01pm UTC](https://forum.kirupa.com/t/setstyle-mx-2004/93563/1 "2003-11-01T22:01:02Z")

</div>

This is how i would set a Style in MX.

```auto

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:

```auto

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

```

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

Sould i do it thusly:

```auto

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?

---

<div class="post-metadata">

**Author:** ![Rossman](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@Rossman](https://forum.kirupa.com/u/Rossman)\
**Post date:** [August 11, 2004, 11:25pm UTC](https://forum.kirupa.com/t/setstyle-mx-2004/93563/2 "2004-08-11T23:25:43Z")

</div>

\_global.style.ScrollPane.setStyle(…);

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