Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to force the cursor start from left when user click mouse into an edit box?

Posted on 2002-03-18
5
Medium Priority
?
166 Views
Last Modified: 2010-04-05
 As Title.
  In my program,in order to facilitate the user,I want to force the inputting start from the most left in a edit box,otherwise the user sometimes must delete the blank character by himself.It's not I expected!
  Thanks for your help !
0
Comment
Question by:SuperPuff
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 6

Accepted Solution

by:
kotan earned 120 total points
ID: 6878833
You can trim the text in edit box when the text got focus.

Trim(TEdit.text)
0
 

Author Comment

by:SuperPuff
ID: 6878884
Thank you!
 You gave me some inspiration !
 It's my first travel in EE.

 Best Regards!
 
0
 
LVL 3

Expert Comment

by:SteveWaite
ID: 6878933
try these too!

  MyEdit.SelStart := 0;
  MyEdit.SelLength := 0; // or
 //MyEdit.SelectAll;

Regards,
Steve
0
 

Expert Comment

by:CleanupPing
ID: 9343250
SuperPuff:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 7

Expert Comment

by:knightmad
ID: 9470867
Wow, Its been a long time since this comment have been visited!

SuperPuff,
No comment has been added lately (19 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: Award points to kotan http:#6878833

-- Please DO NOT accept this comment as an answer ! --

Thanks,

knightmad
EE Cleanup Volunteer

Remember you (all) can object this recommendation if you disagree, just leave a post here explaining why are you objecting and what should be done instead.
Within 7 days probably this thread will be closed, so, hurry up! : )
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Loops Section Overview
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question