# Slider Width In Floatslidergrp

**URL:** https://forum.highend3d.com/t/slider-width-in-floatslidergrp/2245
**Category:** Maya
**Tags:** mel
**Created:** [May 3, 2007, 3:12pm UTC](https://forum.highend3d.com/t/slider-width-in-floatslidergrp/2245 "2007-05-03T15:12:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![paolog](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/p/439d5e/32.png) [@paolog](https://forum.highend3d.com/u/paolog)
#### Post date: [May 3, 2007, 3:12pm UTC](https://forum.highend3d.com/t/slider-width-in-floatslidergrp/2245/1 "2007-05-03T15:12:23Z")

</div>

This is similar to the question in [http://www.highend3d.com/boards/index.php?showtopic=167652](http://www.highend3d.com/boards/index.php?showtopic=167652) but not quite the same...

I have a floatSliderGrp and want to set the slider to be a certain length, so that one step corresponds to a particular increment (namely 1/32). The slider is to display values from 1/32 to 10. Here's my code:

CODE  
&nbsp;&nbsp;&nbsp;&nbsp;int $denominator = 32;  
&nbsp;&nbsp;&nbsp;&nbsp;float $step = 1.0 / $denominator;  
&nbsp;&nbsp;&nbsp;&nbsp;float $min\_value = $step;  
&nbsp;&nbsp;&nbsp;&nbsp;flot $max\_value = 10.0;

&nbsp;&nbsp;&nbsp;&nbsp;int $label\_width = 50;  
&nbsp;&nbsp;&nbsp;&nbsp;int $slider\_length = $max\_value \* $denominator + 1;&nbsp;&nbsp; //this might not be quite right, but that's beside the point... see below

&nbsp;&nbsp;&nbsp;&nbsp;$my\_slider =  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`floatSliderGrp -l "My Slider" -field true -value 1.0 -step $scale\_step -min $min\_value -max $max\_value -columnAlign 1 right -columnWidth2 $label\_width $slider\_length -cc $scale\_slider\_command -dc $scale\_slider\_command -enable false`;

The slider looks all right, except it isn't the length that I asked for. Using a different value for $slider\_length has no effect on the length of the slider.

Is it that the second parameter of -columnWidth2 only specifies how much space should be give to the slider, not how long it is? If so, how do I specify how long the slider should be?

As it is, the slider is too short, and moving it by one step increases it by more than my required increment of 1/32.
