Hello,
tl;dr version:
I was wondering if it is possible to define a custom scrollbar style for the nifty listbox and use it? I think the standard way of doing it does not work here.
long version:
Usually when I want to restyle a standard nifty control I define a style for some of its sub-components like this:
<style id="my-custom-style#subcomponentstyle">.
Then I use “my-custom-style” in the style attribute of the control and the sub component of that control gets restyled.
Now when I look at the control definition of the Nifty listbox on Github, I see this:
<control id="#horizontal-scrollbar" name="horizontalScrollbar" style="nifty-horizontal-scrollbar"/>
So the horizontal scrollbar of the Nifty listbox is directly referencing the default scrollbar style. When I use the method above, there is usually something like
<control id="#horizontal-scrollbar" name="horizontalScrollbar" style="#listbox-horizontal-scrollbar"/>
in the Nifty control definition, and not a hard reference to a standard style.
What is the best way to restyle the nifty listbox? I guess the method I mentioned will not work here? Do I have to copy-paste the nifty listbox code into my project and redefine it under different names and with variable scrollbar styles? Or can I create a new style called nifty-horizontal-scrollbar and that will override the default style definition? Or is there some other way?
Thanks in advance.