Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

TEdit position

Posted on 1999-06-22
4
Medium Priority
?
322 Views
Last Modified: 2012-05-05
Hey folks,

I want to be able to position the cursor in a specific
position in the TEdit field, how ?

;-)

Regards,

GOMF
0
Comment
Question by:GOMF
[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
  • 2
4 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 200 total points
ID: 1384055
hi gomf,

so can it be done

procedure TForm1.Edit1Enter(Sender: TObject);  //can be a other event
begin
  edit1.SelStart := 2;  //Cursur after the second Char
  edit1.SelLength := 0; //No Selection
end;

meikl
0
 
LVL 2

Expert Comment

by:kjteng
ID: 1384056
This is another way:

  Edit1.SetFocus;
  SendMessage(Edit1.Handle, EM_SETSEL, iStartCharater, CharacterSelected);
0
 

Author Comment

by:GOMF
ID: 1384057
mucho thanks kretz.. ;-)

kjteng :
Was thinking about that ;-)) however, first come
first serve ;-))

Regards,

GOMF
0
 
LVL 2

Expert Comment

by:kjteng
ID: 1384058
No problem. Just to make the answer more complete
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

688 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