I contemplated doing this but the designer would have a fit so no go :( Another route I went was to extend the ProgrammaticSkin class and attaching it to the scrollThumb style but I dont think it handles bitmaps. Or at least I couldn't get one to show up. Ah well, I talked the designer into redesigning it. I wish I had the time on this project to just roll my own.
Thanks! B. On Mon, Apr 28, 2008 at 10:04 AM, Ethan Miller <[EMAIL PROTECTED]> wrote: > Here's another hackish approach, but from a different angle. > Good enough for me though. > > I copied the appropriate Scroll class (ScrollThumbSkin) from the > framework into my local source tree and then referenced it (and the > other scroll classes I was modifying) using CSS, like this: > > ScrollBar { > trackSkin: ClassReference("com.westwind.skins.ScrollTrackSkin"); > thumbUpSkin: ClassReference("com.westwind.skins.ScrollThumbSkin"); > thumbOverSkin: > ClassReference("com.westwind.skins.ScrollThumbSkin"); > thumbDownSkin: > ClassReference("com.westwind.skins.ScrollThumbSkin"); > thumbDisabledSkin: > ClassReference("com.westwind.skins.ScrollThumbSkin"); > upArrowUpSkin: > ClassReference("com.westwind.skins.ScrollArrowSkin"); > upArrowOverSkin: > ClassReference("com.westwind.skins.ScrollArrowSkin"); > upArrowDownSkin: > ClassReference("com.westwind.skins.ScrollArrowSkin"); > upArrowDisabledSkin: > ClassReference("com.westwind.skins.ScrollArrowSkin"); > downArrowUpSkin: > ClassReference("com.westwind.skins.ScrollArrowSkin"); > downArrowOverSkin: > ClassReference("com.westwind.skins.ScrollArrowSkin"); > downArrowDownSkin: > ClassReference("com.westwind.skins.ScrollArrowSkin"); > downArrowDisabledSkin: > ClassReference("com.westwind.skins.ScrollArrowSkin"); > thumbOffset: -1; > } > > That's all normal, here's the hack. Inside ScrollThumbSkin, > I set the alpha of the native thumb to 0 and then created a > new round rect at the size I wanted. Since the real thumb > still exists my new thumb doesn't get all the way to the > end of the track (because the larger native one under it > does but I found that from a user experience standpoint > it isn't a horrible tradeoff... the presence of the scroll > bar tells me there's content outside my view and the > thumb and arrows both still work so cares if the thumbs > never reaches the end of the track? > > This difference in behavior is most notable on pages with only > minimal content outside the page, the case where you'd > usually get a gigantic thumb that moved only a few pixels, > IMO, an equally odd behavior and one that requires your visual > design to tolerate a gigantic scroll bar. Not so good for subtler > visual looks. > > On long pages you *barely* notice the altered behavior, it at all > Oddly, horizontal scroll bars seem to work fine with this trick, > ie the behaviors above I've only seen in vertical scroll bars. > If someone could explain why that is to me, I'd be grateful. > > You can see these scroll bars at: > > http://www.djethan.com/westwind/ > > Note that it's a work in progress so you might bump into an > occasional error, etc. Just dismiss and you should be fine. > > cheers, ethan > > > > > On Fri, Apr 25, 2008 at 2:34 PM, Bob Wohl <[EMAIL PROTECTED]> wrote: > > > I'm trying to adapt a skin to a scroll bar with out scaling the > > scrollThumb > > > image. > > > > The "proper" way to do it would be to extend scroll bar, override > > setScrollProperties and copy or extend all the components that extend > > it or use it (or are expecting it) under different packages and etc. > > etc. ... potentially horrible. > > > > >[...] All the searching I've done points me to editing the SDK > > which seems > > > a bit hack-ish. Also, most of the info I found was on FB2 and not 3. > > > > Yeah, it's a hack, but if you want to try it out, I have an example > > here (that might save you from rolling your own from scratch): > > http://rojored.com/hacks/scroll-thumb-fixed-size/ScrollTest.swf > > > > The source example and the monkey patch is here: > > http://rojored.com/hacks/scroll-thumb-fixed-size/ > > > > If you're not familiar with monkey patching, you should check this > > out first: > > > http://blogs.digitalprimates.net/codeSlinger/index.cfm/2007/4/3/Flex-Component-Development > > > > This is a smelly hack.... you should use it only in case of > > emergency ;-) > > > > -- > > gabriel montagné láscaris comneno > > http://rojored.com > > t/506.8392.2040 > > > > > > > ------------------------------------ > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups > Links > > > >