Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to decrease float stepper #43

Open
javydreamercsw opened this issue Oct 3, 2017 · 1 comment
Open

Unable to decrease float stepper #43

javydreamercsw opened this issue Oct 3, 2017 · 1 comment

Comments

@javydreamercsw
Copy link

I have Steppers in a table as follow:

Table options = new Table();
        options.addContainerProperty(Tool.translate("general.name"),
                String.class, null);
        options.addContainerProperty(Tool.translate("level.name"),
                FloatStepper.class, null);
       ...
                FloatStepper stepper = new FloatStepper();
                stepper.setManualInputAllowed(false);
                stepper.setMinValue(0F);
                stepper.setStepAmount(0.5F);
                stepper.setMouseWheelEnabled(false);
                stepper.setImmediate(true);
                stepper.addValueChangeListener(listener -> {
                });
                options.addItem(new Object[]{Tool.translate(skill.getName()),
                    stepper}, skill.getName());
     ...

They display well but don't behave as expected:

  • Steps are in 1.0F increments instead of the 0.5F configured.
  • The down arrow doesn't decrease the stepper.
@javydreamercsw
Copy link
Author

I figured out what was the issue. Once I added:
stepper.setNumberOfDecimals(1);
it started working. Still the code should handle it better instead of stopping working without errors and/or output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant