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

feature request: floatbox (like integerbox) #28

Open
horstjens opened this issue Dec 24, 2014 · 1 comment
Open

feature request: floatbox (like integerbox) #28

horstjens opened this issue Dec 24, 2014 · 1 comment
Assignees

Comments

@horstjens
Copy link
Collaborator

a box to enter numeric float (and integer) values, with default, lowerbound and upperbound.
Ideally a list of accepted decimal point signs should be an optional parameter

def floatbox(msg="please enter float or integer",
title="",
default=0.0,
lowerbound=0.0,
upperbound=99.9999,
acceptable_decimal_signs=[".",","] ):

The floatbox shows an error message like the integerbox when the entered value is not integer nor float, or if the entered value is below lowerbound and above upperbound.
Error message is also shown if more than one single decimal sign is entered.

@robertlugg
Copy link
Owner

I think every text entry box should support this. if we add a 'type=str' argument, for instance, the GUI will require you to enter a valid string before pressing OK. Same with other types like type=float

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

No branches or pull requests

2 participants