views:

28

answers:

1

I am writing a firefox extension where I need a bidirectional scale element (https://developer.mozilla.org/en/XUL/scale)

While the sample code of this xul element talks about a scale in one direction, how can I make a scale which can have a slider bar at the two directions so that I can take a range as the input?

Thanks, Kapil

+2  A: 

One of the cool things about XUL is that you can create new XUL elements using XBL bindings which is very easy to do.* The official tutorial from Mozilla is https://developer.mozilla.org/en/XUL_Tutorial/Introduction_to_XBL and http://mb.eschew.org/15 appears to be another good one.

Since your new element will be relatively similar to the built-in XUL <scale> element, you might want to start by looking at its XBL bindings. Just point your Firefox browser at chrome://global/content/bindings/scale.xml and then maybe you can extend/modify it to get what you need.

* At least, it looks easy. I haven't actually done it.

MatrixFrog
Thanks a lot for the pointers! I will take a look at these.
Kapil