Solved

Moving Cursor in a Edit Box in Delphi5

Posted on 2002-07-07
6
366 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

730 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