Solved

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

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

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 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