Page 1 of 3

Custom Scrollbar *** UPDATED Dec-09-2012 ***

Posted: Sun Apr 22, 2012 12:13 pm
by [RZ]
this version has been deprecated
use this viewtopic.php?f=53&t=68218 instead

[rz] Scrollbar v1.2.2

This extensions set allows you to add custom scrollbars to layers.
Sample project file included.

Some features:

Custom images for up/down and left/right arrows.
Draggable track for fast scrolling.
Clickable trackbar for fast pointing.
Full keyboard support (autorepeat supported in Opera as well).
Mousewheel support.
Complex content supported (not just one plain-text block).
Compatibility support for complex page designs (like nested and hideable layers).
You can have as many scrollbars you want in the same page!
Tested in Chrome, FireFox, Opera, Safari, Maxthon, Lunascape, IEquirks, IE6, IE7, IE8 and IE9;
...and more

HTML 4.01 Transitional
W3C compliant

New in version 1.2.2:
Fixed a few pixels gap when the container has padding (i.e. now you can scroll the text object content directly; also when it has padding and overflow settings).
Improved keyboard events handling in Safari and Lunascape (Gecko and WebKit modes) browsers in pages with multiple jQuery effects running in background.
Fixed the background image missing in styled objects under certain conditions.
A workaround for a known issue with click/doubleclick events in IE8 and earlier versions.
New max scrolltrack size property for both horizontal and vertical scroll modes; this allows proportional, fixed and fixed-proportional size modes for the trackbar.
Better focus method under certain browser conditions.
Some minor tweaks in the extension core.

New in version 1.2.1:
Workaround that solves a bug (touchscreen devices false positive) in Maxthon browsers.
Compatibility backward for a correct startup in IE7 and earlier and other browsers with similar engine/core when using php dynamic content.
Workaround for IE bug, a pixel gap rendering rtl pages.

New in version 1.2:
Support for touch devices (drag/scroll).

New in version 1.1.1:
Touch'n'scroll feature automatically disabled on touch devices for smoother performance.
Horizontal scrollbar's track bar 0px fixed in edit mode.

New in version 1.1:
Improved compatibility with IE.
Horizontal scrollbar added (with synchronization support for the vertical scrollbar extension).
"Touch'n'scroll" feature.

How to use?

Design your layer as you usually do, then set its overflow property to hidden.
Add the custom scrollbar extension to your page.
Type in the layer ID that you want to customize.
Use the provided sample images for the arrows or design your own ones that match your scheme.

The same applies to the horizontal scrollbar. Just only one rule you must follow.
If you want to have both horizontal and vertical scrollbars synchronized for the same layer, the horizontal scrollbar must be after the vertical one; use the Object Manager panel to be sure you did as it is described. Of course, don't forget to tell the horizontal scrollbar (in its properties window) with which vertical extension will be synchronized.

Now you don't need anymore the previously provided fix for transparent layers in IE. The mousewheel support does it automatically!
Due to technical reasons, the support for IEquirks was removed from the horizontal scrollbar.


Re: Custom Scrollbar

Posted: Sun Apr 22, 2012 1:53 pm
by Pascal-Gilles
Hi RZ,

So you did it :wink:

Very nice job as usual...


Re: Custom Scrollbar

Posted: Sun Apr 22, 2012 2:28 pm
by [RZ]
thank you crochepattes!
as always you have only kind words, thanks.
i was researching hard on how to workaround all the issues/limitations of each browser, events, keyboard, autorepeat, mousewheel, multi-instance, tablets, nesting, ie (the special problematic browser by itself) ufffffffffffff... a lot of etc, etc... and at the same time get a clean and lightweight code.
hope you all can find it useful.

(i'm working hard for horizontal-bidirectional support, and i started something with inlineframes also...)

Re: Custom Scrollbar

Posted: Sun Apr 22, 2012 4:21 pm
by protectourlands
Brilliant RZ! I can really use this.

Re: Custom Scrollbar

Posted: Sun Apr 22, 2012 4:26 pm
by [RZ]
thank you protectourlands!
all your kind words encourages me to continue writing code.
i'm already using it in one of "my" sites!
hope you can also find it useful.
thanks again for your feedback.

Re: Custom Scrollbar

Posted: Sun Apr 22, 2012 11:08 pm
by supersonictt
Amazing extension! Thanks a lot [RZ]
Just one question, is it possible to have scroll-on-touch in the newer versions?

Re: Custom Scrollbar

Posted: Sun Apr 22, 2012 11:09 pm
by [RZ]
what is scroll-on-touch?

Re: Custom Scrollbar

Posted: Sun Apr 22, 2012 11:17 pm
by supersonictt
Well, I saw (in some websites) that if you put the mouse on the down arrow (without clicking) the scroll starts until the mouse is out.
I cannot recall those websites, but one of them is made for a customer by a WWB user as I was looking into his portfolio. It was a menu for a restaurant and the content (the menu items) was an image. I guess it is an extension but I really cannot find out who this user is :(

Re: Custom Scrollbar

Posted: Sun Apr 22, 2012 11:23 pm
by [RZ]
ah ok, i got it.
there is something ready, but i'm still doing some testings in tablets...
stay tuned!
(ps: sorry, i forgot to thank you for your kind words)

Re: Custom Scrollbar

Posted: Sun Apr 22, 2012 11:28 pm
by supersonictt
Thank you so much :)
Looking forward to using it in one of the sites am going to make.

Re: Custom Scrollbar

Posted: Mon Apr 23, 2012 9:22 am
by stamjoe

Re: Custom Scrollbar

Posted: Mon Apr 23, 2012 12:56 pm
by [RZ]
@supersonictt @stamjoe
thank you, hope you find this ext useful!
(and don't forget to post a link to your sites, i want to see how you use it! ;) )

Re: Custom Scrollbar

Posted: Mon Apr 23, 2012 8:34 pm
by supersonictt
Whenever I use it I will keep you update it with the site :)
And by the way, my own site am building is constructed on the layers extensions, I will send you the link on the layers thread as soon as it is published :)
The extensions you are providing are REALLY "AMAZING, isn't it?" ;)
Thanks a million [RZ].

Re: Custom Scrollbar *** UPDATED Apr-25-2012 ***

Posted: Tue Apr 24, 2012 8:51 pm
by [RZ]
An update is available (check the first post):
Even more compatibility with IE.
Don't need the fix anymore for transparent layers in IE (the mousewheel behaves strange in transparent layers in IE, fix removed, automatic setup added).
Horizontal scrollbar extension added.

Re: Custom Scrollbar *** UPDATED Apr-25-2012 ***

Posted: Wed Apr 25, 2012 4:32 am
by [RZ]
Bosun wrote:Nice update RZ. Am happy that it worked with existing WWB layer capability. Especially the Horizontal and vertical resizing. It will be nice if it can support jquery effect/transition like that of Paul's. Good job RZ.
thank you for your feedback.
it works with the scrolling layers extensions set.
i removed the jquery portions because of a lot of downsides and a logic flaw in keyboard handling, moreover, has a lack of autorepeat feature in opera, and mine sorted it out, also there is a conflict with keypress and keydown events, also it was solved in this extension. at this point, didn't want to test the mousewheel capability (that this extension has, of course, and also an automatic fix for IE)... there are many many reasons that in my extensions i write my own code, but this is beyond of this topic. all of the abovementioned was done taking in count also external filesizes, and a lot of other etc's...
of course i'll try to improve it, but my target is "clean and lightweight code".
you can see in the demo that there are 6 scrollbars, 2 of them "attached" to the same layer and running synchronously in the same page with no issues at all (also tested in tablets and iphones, in more than 6 browsers and in 5 IE versions)... well, i myself am using them ;)
fortunately here in the forum are two options!
again, thank you for your feedback! hope you can find this extension useful!