Jump to content

[SOLVED] Slider values


photo

Recommended Posts

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

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

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
×
×
  • Create New...