lars.saalbach Posted April 2, 2012 Share Posted April 2, 2012 Hello Team, me again^^. I've got a "problem" or i'm not getting the idea how to manage: I'm trying to add a slider with min value 80 and maxvalue 120. The thing is that the slider just should display 80, 100 and 120 and not 81,82 etc. I tried so much with .addAttach(label,"%XXX",XX) I tried with decimal places and positive integervalues and with multiplier , the problem is, if multiplier is set higher, the value will be divided, so if i say 2 the value is 60 instead of 120, if i do 240 i would get 120, but i _NEVER_ got 3 steps i always got 81,82,83...120. Nothing worked for me. PS: Trying over 3 hours now.... Maybe you got an idea / solution? Best regards Lars Link to comment
ulf.schroeter Posted April 3, 2012 Share Posted April 3, 2012 maybe you should simply use WidgetCombo/SpinBox for discrete values instead of WidgetSlider designed for linear value ranges.... Link to comment
unclebob Posted April 3, 2012 Share Posted April 3, 2012 Hello, Lars. :) The basic idea is simple: create WidgetSlider with smart min/max values (for 3 steps you can set min to 0 and max to 2, so you'll have 3 steps for your slider), set 'changed' callback for that slider, modify its value and set it to other widgets. I've prepared a sample for you. ui_layout_4.zip Link to comment
lars.saalbach Posted April 3, 2012 Author Share Posted April 3, 2012 Hello together, thanks for advice. I expected your answer unclebob, but i thought it also would be possible without triggers too, but ok, so i need to implement one. @Ulf, but with sliders it lookes more friendly, else i would implemented already an combobox. Thanks for sample too. Best regards Lars Link to comment
Recommended Posts