Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6471651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:14:56+00:00 2026-05-25T06:14:56+00:00

I got two TEdit controls. When I tab out of edit1, edit2 receives the

  • 0

I got two TEdit controls. When I tab out of edit1,
edit2 receives the focus. On my OnExit event of Edit1
I have the following code:

procedure TForm1.Edit1Exit(Sender: TObject);
begin
  edit2.Enabled := false;
  edit2.Enabled := true;
  edit2.setfocus;
end;

Edit2 has the focus. However, there is no caret in it.
I can start typing but it’s confusing as I do not know
which control has the focus.

I’m more interested on what’s with the flipping of the
Enabled property that’s causing some messages to be not
firing properly ? For instance edit2’s OnEnter event
is not being triggered.

This is on D2006 if it matters at all.

Thanks for the reply.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:14:57+00:00Added an answer on May 25, 2026 at 6:14 am

    I don’t understand why you disable and enable edit2, but you do this:

    procedure TForm1.Edit1Exit(Sender: TObject);
    begin
      edit2.Enabled := false;
      edit2.Enabled := true;
      edit2.setfocus;
      PostMessage(edit2.Handle, WM_SETFOCUS, 0, 0);
    end;
    

    BTW, I agree with Andreas Rejbrand.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got two Silverlight Controls in my project, both have properties TeamId. I would
I have got two movieclips on the main timeline. First one is envelope_mc and
I've got two divs, both with the following css: #div-id { width:96%; padding: 10px
I got two people with Motorola phones comlaining that my spinners have white text
I've got two controls in my Interface Builder file, and each of those controls
I've got two PC's, but both have another IP. The simple question is how
I've got two PostgreSQL databases that have been created using the same sql file.
I have got two classes, one a subclass of the other (say Animal and
I got two errors after I compiled my code. The errors are: 1. local
so i have got two models with each one controller: Model Project has_many Themes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.