| |

VerySource

 Forgot password?
 Register
Search
View: 1750|Reply: 7

How to locate the "input cursor" in the Edit control to a given position and movement problem requires expert guidance

[Copy link]

2

Threads

7

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-1-17 10:40:01
| Show all posts |Read mode
Edit control problem,
I want to make the Edit control like AutoCAD's command input line
For example: Command: Enter the center point =

As soon as I setFocus Edit, the input cursor will automatically jump to "Command: input dot =", it cannot be the first character of Edit
And, after jumping to “Command: Enter Dot =”, the cursor cannot be “returned” (that is, pressing the BackSpace key, you can only return to "=". You cannot return "Command: Enter Dot =" ),
You can't use "Left Arrow" to move "=" before, you can only move after "="


Please master how to implement this method, any ideas for my reference, thank you very much.

1. How to position the input cursor yourself
2. When the cursor moves to a given position, you cannot use "BackSpace" and "Left Arrow" to continue moving to the given position


Please master
Reply

Use magic Report

0

Threads

22

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2020-1-22 16:45:01
| Show all posts
TMaskEdit doesn't know if it works
Reply

Use magic Report

2

Threads

7

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-1-22 18:00:02
| Show all posts
Don't be able to TMaskEdit, more troublesome. Boss, you don't seem to have used AUTOCAD, so I don't know what I mean.
Reply

Use magic Report

0

Threads

45

Posts

32.00

Credits

Newbie

Rank: 1

Credits
32.00

 China

Post time: 2020-1-22 21:27:01
| Show all posts
MaskEdit should be able to set the Mask property to the prompt character, it seems to automatically skip the prompt character

Or SelStart SelLength SelText in the Edit control can set the cursor position
Then respond to keyboard input events, determine the corresponding keys of the keyboard to block
Reply

Use magic Report

2

Threads

7

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 Great Britain

 Author| Post time: 2020-2-15 11:45:01
| Show all posts
What SelStart SelLength SelText in the Edit control represents. . . . .
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-2-18 09:30:02
| Show all posts
SelStart SelLength SelText
Reply

Use magic Report

2

Threads

7

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-2-22 13:00:01
| Show all posts
What SelStart SelLength SelText in the Edit control represents. . . . . (Chinese meaning what function or attribute),
Reply

Use magic Report

0

Threads

45

Posts

32.00

Credits

Newbie

Rank: 1

Credits
32.00

 Invalid IP Address

Post time: 2020-3-19 22:15:02
| Show all posts
SelStart Sets where the selection starts
SelLength sets the selected length
SelText selected

Call SelText after the first two properties are set

Set length to 0 start to the cursor position

Please take a look at BCB first ...
Reply

Use magic Report

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

Points Rules

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

Quick Reply To Top Return to the list