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

Kapil
  • 572
  • 1
  • 5
  • 23
  • If I'm understanding you correctly, you want one slider with two "thumbs" rather than a "bidirectional" slider. – Tyler Jul 16 '10 at 15:29

1 Answers1

3

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.

Tyler
  • 21,762
  • 11
  • 61
  • 90