<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.0.0 - 10.5.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSScroller/setFloatValue:knobProportion:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSScroller(im)setFloatValue:knobProportion:"
  },
  "title" : "setFloatValue:knobProportion:"
}
-->

# setFloatValue:knobProportion:

Sets the position of the knob to `aFloat`, which is a value from 0.0 (indicating the top or left end) to 1.0 (the bottom or right end).

```
- (void) setFloatValue:(float) value knobProportion:(CGFloat) proportion;
```

## Discussion

Also sets the proportion of the knob slot filled by the knob to `knobProp`, also a value from 0.0 (minimal size) to 1.0 (fills the slot).

## See Also

[`var knobProportion: CGFloat`](/documentation/AppKit/NSScroller/knobProportion)

The proportion of the knob slot that the knob should fill.

[`var floatValue: Float`](/documentation/AppKit/NSControl/floatValue)

The value of the receiver’s cell as a single-precision floating-point number.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)