I haven’t found any further problems with GControlPalette, all good thank you
The Numeric input field does seem to be more complex than I had originally thought.
I think your solution of option 2 may be the best for GControl.
That said, maybe I should try and better describe how I would use such a control and how I’m using my simple hacked up version.
-
No scientific number notation, I have never had to put this notation style in a UI and I haven’t used a UI other than a calculator that implemented it…I’m not really sure how often this notation style is likely to be used ?
-
The control does not need to do maths itself i.e no addition or subtraction calculated whilst inputting numbers… so no need for ‘+’.
-
The controls min and max values are defined at initialisation.
-
Integer or decimal defined at initialisation.
-
The number input field is a square divided into 3 rows, the middle row is the number display area, the top row and lower row are each for a label (see image attached).
-
If the cursor is anywhere over the input field the user may scroll the mouse wheel to increment/decrement the current value.
My reason for wanting scroll input is that if you have UI that is mostly selecting objects, pressing buttons, dragging sliders,etc… then you come to a number field that only takes key input you probably have to take your hand off the mouse to type, then go back to the mouse to move onto the next button/field…all this chopping/changing slows things down. -
My bodged version currenlty ignores anything that is not a number;
if (keyChar >= '0' && keyChar <= '9') { }
The one thing I haven’t done is find a way to deal with keyed input of ‘-’ for negative numbers, that’s just because I haven’t needed to use them as 95% of the UI’s I make are for controlling external hardware that does not take a negative number as an input.
I’m not sure if any of the above helps at all, but hopefully you can see how I would use such a control