Solved

Moving Cursor in a Edit Box in Delphi5

Posted on 2002-07-07
6
362 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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 Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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 video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

12 Experts available now in Live!

Get 1:1 Help Now