?
Solved

Moving Cursor in a Edit Box in Delphi5

Posted on 2002-07-07
6
Medium Priority
?
370 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
[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
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

770 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