Solved

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

Posted on 2002-03-18
5
160 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
5 Comments
 
LVL 6

Accepted Solution

by:
kotan earned 30 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Strange behavior when a form is closed 6 69
control image tags in a string ? 12 153
tvirtualstringtree freeze when load too manny images 10 80
Base1 Encode/Decode 3 87
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 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