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

Floating Point Spinbox #201

Open
desttinghim opened this issue May 4, 2023 · 3 comments · May be fixed by #206
Open

Floating Point Spinbox #201

desttinghim opened this issue May 4, 2023 · 3 comments · May be fixed by #206

Comments

@desttinghim
Copy link
Contributor

I have need for a numerical input, like a spinbox, but for floating point numbers. I've seen this in wxWidgets, they call it a DoubleSpinBox.

@cody271
Copy link
Contributor

cody271 commented May 5, 2023

The underlying Windows control (UPDOWN_CLASSW) that uiSpinbox uses is integer only, doesn't support floating point values.

Unix and Darwin controls do support this though, and we enforce integer only just for compatibility with Windows.

@desttinghim
Copy link
Contributor Author

Ah okay. Seems like this would be a good thing to put in the spinbox documentation in case people are looking for one that does floats. Is there a way to implement a custom widget that does this? For now I'll fall back to using a uiEntry and parse the values in my own code.

@szanni
Copy link
Contributor

szanni commented May 6, 2023

Is there a way to implement a custom widget that does this?

It does seem like a custom control would be possible using the win32 API by overriding some of the handlers as suggested here and here.

So it does look like writing a uiSpinboxDouble would be possible, Windows being the only cumbersome undertaking.

@desttinghim desttinghim linked a pull request May 17, 2023 that will close this issue
3 tasks
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

Successfully merging a pull request may close this issue.

3 participants