| |

VerySource

 Forgot password?
 Register
Search
View: 19|Reply: 5

Ask about the text box input

[Copy link]

3

Threads

4

Posts

4

Credits

Newbie

Rank: 1

Credits
4

 China

Post time: 2020-3-3 11:00:01
| Show all posts |Read mode
I made a text box on the form, which is a numeric type. The input mask is 99999999.999999. When entering a value, always click a blank space. For example, if you click on the position of the hundredth place, you can only enter the place of the hundredth place. If it is the thousands place You have to move the mouse and keyboard, and after entering the decimal point, you can't move backwards by yourself. You must move to the decimal place to enter. Can you enter it as convenient as EXCLE? Thank you
Reply

Use magic Report

0

Threads

19

Posts

14

Credits

Newbie

Rank: 1

Credits
14

 China

Post time: 2020-5-16 19:30:01
| Show all posts
Do you want to select all after the text box has the focus?

What is it like Excel?
Reply

Use magic Report

3

Threads

4

Posts

4

Credits

Newbie

Rank: 1

Credits
4

 China

 Author| Post time: 2020-5-18 01:00:02
| Show all posts
When inputting 8762.34 like EXCEL, the spreadsheet EXCEL can be directly input, but after I set the mask, after entering the decimal point, I can not continue to input, I can only use the keyboard and mouse to move to the decimal point before I can enter it, bad Meaning, my expression is not very clear :)
Reply

Use magic Report

0

Threads

19

Posts

14

Credits

Newbie

Rank: 1

Credits
14

 China

Post time: 2020-5-19 15:30:01
| Show all posts
After entering the mask, the decimal point does not need to be entered.
Reply

Use magic Report

0

Threads

19

Posts

14

Credits

Newbie

Rank: 1

Credits
14

 China

Post time: 2020-5-20 02:45:01
| Show all posts
Without setting the mask, add the code in the Keypress event of the text box:

LPARAMETERS nKeyCode, nShiftAltCtrl&&system code
IF! (Between (nKeyCode, 48,57) or nKeyCode = 46)
nodefault
ENDIF
Reply

Use magic Report

0

Threads

11

Posts

10

Credits

Newbie

Rank: 1

Credits
10

 Singapore

Post time: 2020-5-22 17:30:01
| Show all posts
The previous version had this problem. Even in VFP9.0, it has not been completely solved.
Set InputMask = "999,999,999.99" // Decide according to the size of the value, can be set to 6 9s, don't need 9
Set SelectOnEntry = .T. // Let users select all as soon as they enter
It will be a little more convenient to input in this way, the user will not be called. To do like Excel, see if Ken will be next
Improved in the version. Under the above settings, you can continue to enter two digits after entering the decimal point.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2020|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list