Have a B4XPlusMinus that goes from 0 to 310. Wanting to set it to say 250... That takes holding down the arrow for a while and then its stops close tp the value I want.
Anyway, can you type in text? I know, Stupid question #59901
Here's one I amended for myself, your welcome to try it and see if it does what you want or modify it as you like. It only works with B4j as that's all I needed at the time, and uses a TextField.
Yesterday (or rather last night ) I started fiddling to create a "wrapper class" (Erel style ) to get that functionality.
It works, although I have two problems:
1 - in B4J the TextField I used is not the right width but in B4A it does (I will submit this question to Erel)
2 - I couldn't do the B4I part, again for the usual reason: I don't have B4I (because I don't have Apple sfuff - nor would I want to spend $ 99 every year to make Apple rich).
Have a look at the Base_Resize sub in the B4xPlusMinus class, the sizing is all done in there as it is possible to have different orientations for the B4xPlusMinus view. Add the sizing of the Textfield to that.
Have a look at the Base_Resize sub in the B4xPlusMinus class, the sizing is all done in there as it is possible to have different orientations for the B4xPlusMinus view. Add the sizing of the Textfield to that.
Thanks, Steve, but I don't want to modify the original class (nor make a modified copy of it by renaming it).
The goal would be to create a sort of wrapper, as Erel often does, for example with the many "versions" of CustomListView. He creates a class (or another custom view) to which he passes a CustomListView, to which to add functionality.
The project I am attaching (whose important part is the B4XPlusMinusEdt class) will surely have some defects, some corrections to make; also, the part for B4I is missing.
I haven't run many tests.
Note that this is for use with numeric values only; it makes no sense with a list of strings to be able to write the value directly.
[B4XPlusMinus can handle a list of strings too]
Thought sharing as well.
Have developed various special custom views, have called those widgets, to control digital creations (like LEGO, Tinkerforge, Arduino).
One of the custom view widgets is the WidgetPlusMinus.
It is based on the B4XPlusMinus and B4XDialogs InputTemplate.
NOTE: Not tested on B4A & B4i. Accepts positive whole numbers only. Validation check on input pattern and value in range.
Thought sharing as well.
Have developed various special custom views, have called those widgets, to control digital creations (like LEGO, Tinkerforge, Arduino).
One of the custom view widgets is the WidgetPlusMinus.
It is based on the B4XPlusMinus and InputTemplate.
NOTE: Not tested on B4A & B4i. Accepts positive whole number only. Validation check on input pattern and value in range.
After seeing that, I realized that I had not considered the possibility of the vertical setting, in the class that I have attached (project) to my previous post!
2 - I couldn't do the B4I part, again for the usual reason: I don't have B4I (because I don't have Apple sfuff - nor would I want to spend $ 99 every year to make Apple rich).