UpDownArrows & TextField

Making progress :smiley: …anyways I want to increase numbers in TextField1 by UpDownArrows1.
I Want min. number 100 and max. 999999.9999 (it doestn matter)
I Don’t want - (minus) number. So here is my code so far.





In property of TextField1 i enter in “Mask” 999999.9999 number as i saw somewhere in some forum.

UpDownArrows1 Down Event:

[code] Dim n As Integer

n = val(ViewsField.Text) - 100
if n < 1 then return
ViewsField.text = str(n)[/code]

UpDownArrows1 Up Event:

[code] Dim n As Integer

n = val(ViewsField.Text) + 100
if n > 100000 then return
ViewsField.text = str(n)[/code]

WELL IT WORKS FINE, BUT…when I press up it comes lets say to 400, but after i want 435 and enter manually by typing in TextField1, …next whats happens is, that counter become crazy and increase how he want by thousands :frowning:
SO I WOULD LIKE to Enter manually as well If i need specific number.
Anyone? :frowning:

I FOUND BY MYSELF heheheehhe
I deleted TextFieldKeyup and KeyDown and it works!!!
:stuck_out_tongue: :stuck_out_tongue: :smiley:

Yes, use the UpDownArrows for this purpose only. :slight_smile:

I dont understand if you was thinking ironicly or serious. I just find the arrows are more nice sure i can type normaly but also i just learn so thx for understanding.

just a minor comment…

  Dim n As Integer
  n = val(ViewsField.Text) - 100
  if n < 1 then return
  ViewsField.text = str(n)

can be reduced easily to this


Just a hint for moving forward…

I was thinking seriously. I think, when I see a text field with numbers inside, I wouldn’t expect to press the arrow keys to manipulate the values.

Thanks Dave, now I learned something new.

I would. That’s how it works in Adobe InDesign and Photoshop, and it’s one of my favorite features. Much easier to increment values slightly with the up/down arrows than having to take my hands off the keyboard to use the mouse and click tiny arrows.

It is a power user feature, though. Always have a more obvious (visual) way to do also.

Thanks for reporting. :slight_smile:

I am slowing working on a SuperTextEdit class that will incorporate a textedit field, a label, as well as an optional icon to indicate a required field, and another to indicate an error. This control will automatically resize it self to deal with changes in label text, as well as support validation for many specialized datatypes (numbers, phone (US and Foriegn), email address, URL, Date, Time etc)

User will have full control over Font, Size, Color (label and text independantly) … most all features of a standard TextEdit

and it will look something like this (Green Background is for testing)

Forum Edit doesn’t work… again

If I refresh the page - the edit option then appears (for me at least)
I also think that you can only edit if nobody has viewed the post yet (I could be wrong).

This works, but many times refreshing the page doesn’t give me the edit possibility.
I’ve noticed that most of the times, I don’t get the edit option when I’m viewing/reacting on my iPad.