PDA

View Full Version : Reskinning the Scrollbar within a list


circularsquare
04-24-2008, 10:17 PM
I'm trying to reskin the scrollbar within a list.

In particular, I'd like to:

A) Remove the up/down arrow boxes + their functionality entirely.
B) Make the scrollbar thinner.

How do I achieve this?

Editing the symbols is not enough to change the width because somehow the class code resizes it back automatically....

ryryguy
04-25-2008, 09:29 PM
That scaling can be such a pain sometimes... I wish they had included a switch in a style or something that could be used to turn it off. At least for our purposes, 90% of the time the artist makes the skin the size that he wants the component to be, so the scaling is useless and only gets in the way... especially when he wants to do something like have an "over" skin that appears larger than the "up" skin. But I digress...

Anyhow, I've had that same issue with a scroll bar. I worked around it by creating a "null skin" which is essentially an empty symbol, and setting that skin on all the arrow styles and the track style. That effectively removes the buttons and the scroll bar track.

To get the skinnier scrollbar, I just put the art for the scrollbar track directly on the stage or clip that contains the component. Effectively there is no scroll bar track as far as the component is concerned, but graphically it looks like there is. This is not a perfect method: the scroll thumb is still scaled, and the fake scroll bar track is shown even when there is not enough content for the component to create a scroll bar (i.e., there's still a fake track when there is no thumb). So far we've been able to live with those limitations, and it's conceivable to put some logic someplace to show and hide the fake track when the component is showing and hiding the real thumb-only scroll bar.