Solved

Moving Cursor in a Edit Box in Delphi5

Posted on 2002-07-07
6
363 Views
Last Modified: 2010-04-04
hi
i want moving cursor in a edit box ( TEdit Component ) or (TDBEdit Component) to a Custom Place
please help me
thank
0
Comment
Question by:mpzlarge40
6 Comments
 
LVL 44

Expert Comment

by:bruintje
ID: 7135473
Hi mpzlarge40,

what are you trying to do? is this for data entry
the SelStart property of the box will give the cursor's position inside an Edit box and you can even set it

HAGD:O)Bruintje
0
 
LVL 9

Expert Comment

by:ginsonic
ID: 7136815
0
 
LVL 9

Expert Comment

by:ginsonic
ID: 7136827
Or set SelStart to the wanted position and SelLength to 0. That will put the caret to the SelStart position without selecting anything:

Edit.SelStart:=YourPos;
Edit.SelLength:=0;
0
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.

 
LVL 1

Expert Comment

by:slavikn
ID: 7151336
Maybe you meant to change the MousePosition?

Mouse.CursorPos := Point(Left + pnlPlayArrow.Left + 32, Top + pnlPlayArrow.Top + 32);

This will move the MousePosition to the component named 'pnlPlayArrow'.
0
 
LVL 3

Expert Comment

by:loop_until
ID: 7339413
Or if you want to have your text cursor moved to that particular edit, try "focusing" it.

Edit1.SetFocus;
DBEdit1.SetFocus;

Or if its the first component you want to have focused when starting a project try setting the ActiveControl property of your form to your Edit box.

Is this what you wanted?

Anyway, I think you have the 3 possible answers ;).
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 8280709
All,
I am unlocking this question in preparation for cleanup.  I will return in 7 days to finalize this question.  Please leave any recommendations for the final state of this question, I will take all recommendations into consideration.  Failing any feedback, I may decide in 7 days to delete or PAQ this question with no refund.  Thanks.

SpideyMod
Community Support Moderator @Experts Exchange
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

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 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 will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

895 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

14 Experts available now in Live!

Get 1:1 Help Now