Issue with horizontal/vertical Slider after changing style!

hey there,



i have changed the style of the H slider and V slider,

i was successfull in changing it the way it should look, but there a few bugs i encountered after changing the style!

i dont knw what is possibly wrong i have done in editing!



this here is the image!











here u c the slider, they are as i want them to be displayed, but in the vertical slider, when i click on the right side of the line or left side, it still gets slids, which i dont want it to slide, as there aint buttons there, but i guess i have removed them from the style so they arent displayed, but the functionality is still there, so i dont knw wat to do…

its the same with the H slider, if clicked on top of the line or bottom upstill some more pixels it slides!



here is my edited style file,



[xml]<?xml version=“1.0” encoding=“UTF-8”?>

<nifty-styles xmlns=“http://nifty-gui.sourceforge.net/nifty-style-file.xsd” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=“http://nifty-gui.sourceforge.net/nifty-style-file.xsd http://nifty-gui.sourceforge.net/nifty-style-file.xsd”>

<!-- ++++++++ -->

<!-- vertical -->

<!-- ++++++++ -->

<style id=“nifty-vertical-slider#panel”>

<attributes childLayout=“vertical” width=“0px” focusable=“true” />

</style>

<style id=“nifty-vertical-slider#background”>

<attributes filename=“interface/style/slider/vsliderLine.png” width=“20px” height="" childLayout=“absolute” imageMode=“normal”/>

<effect>

<onClick name=“focus” targetElement="#parent" />

</effect>

</style>



<style id=“nifty-vertical-slider#position”>

<attributes filename=“interface/style/slider/vslider.png” x=“6px” y=“0px” imageMode=“normal” childLayout=“absolute” />

<effect>

<onClick name=“focus” targetElement="#parent#parent" />

<onEnabled name=“renderQuad” startColor="#2228" endColor="#2220" post=“true” length=“150” />

<onDisabled name=“renderQuad” startColor="#2220" endColor="#2228" post=“true” length=“150” />

</effect>

</style>



<!-- ++++++++++ -->

<!-- horizontal -->

<!-- ++++++++++ -->

<style id=“nifty-horizontal-slider#panel”>

<attributes childLayout=“horizontal” height=“0px” focusable=“true” />

</style>



<style id=“nifty-horizontal-slider#background”>

<attributes filename=“interface/style/slider/hsliderLine.png” width="
" height=“20px” childLayout=“absolute” imageMode=“normal” />

<effect>

<onClick name=“focus” targetElement="#parent" />

</effect>

</style>

<style id=“nifty-horizontal-slider#position”>

<attributes filename=“interface/style/slider/hslider.png” x=“0px” y=“5px” imageMode=“normal” />

<effect>

<onClick name=“focus” targetElement="#parent#parent" />

<onEnabled name=“renderQuad” startColor="#2228" endColor="#2220" post=“true” length=“150” />

<onDisabled name=“renderQuad” startColor="#2220" endColor="#2228" post=“true” length=“150” />

</effect>

</style>

</nifty-styles>

[/xml]





see if i can be helped! :slight_smile:



thanks!

Try commenting the lines following lines and see if it works:



[xml]

<effect>

<onClick name="focus" targetElement="#parent" />

</effect>

[/xml]

no change, still the same!

What happens if you comment all “onClick” events? Does it still notify any events?

commenting on all onclicks, still it keeps sliding!

damn, thats nasty! :s

Then make sure your sliders controls are really referencing that style file. If yes, then the events aren’t on the style file, but in the slider nifty control. Maybe you’ll have to take a look at the slider control deffinition xml file or the SliderControl.java.