Solved

Moving Cursor in a Edit Box in Delphi5

Posted on 2002-07-07
6
364 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Using idhttp to login to instagram 2 89
QRReport  TQrmemo vertical stretching 1 46
Magic Software info 18 130
how can i search if string exist in array ? 3 55
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

776 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