Solved

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

Posted on 2002-03-18
5
158 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to use Hibernate  and delphi ? Does anyone know any tutorial? 2 146
How to fill array with TArray.Create? 14 79
Newbie Thread Programming 1 139
oracle global variables 4 63
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now