Solved

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

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

708 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

20 Experts available now in Live!

Get 1:1 Help Now