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

Custom formatters for Slider/DragValue etc #1221

Closed
AlexApps99 opened this issue Feb 7, 2022 · 1 comment · Fixed by #1851
Closed

Custom formatters for Slider/DragValue etc #1221

AlexApps99 opened this issue Feb 7, 2022 · 1 comment · Fixed by #1851
Labels
feature New feature or request

Comments

@AlexApps99
Copy link
Contributor

Is your feature request related to a problem? Please describe.

I'm making a debugger GUI for a project I'm working on, and I'd like to select an address from a DragValue.
However, it's conventional to notate addresses in zero-padded hexadecimal, rather than decimal.

Describe the solution you'd like
There should be some way to specify custom formatting on a number. Ideally this should be flexible so users can do whatever they want, like using Chinese numerals, base 12, or whatever.
This could be implemented with a function that takes a closure to format it, or it could be done by having a custom implementation of Display on Numeric.

Describe alternatives you've considered

We could also just have a flag for hexadecimal/pad length etc but that's probably not worth the complexity

Additional context

@AlexApps99 AlexApps99 added the feature New feature or request label Feb 7, 2022
@emilk
Copy link
Owner

emilk commented Feb 7, 2022

I think adding a custom formatting closure makes sense (similar to recent PR:s on Plot: #1130 and #934)

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

Successfully merging a pull request may close this issue.

2 participants