Post by Ph. B.Post by jason madrigalHi I'm new in delphi pascal...
that I'm trying is to focus an edit control in an button click event.
thanks in advance for the help
First, I suppose you have put a TButton control and a TEdit control
on the form.
Next, link a procedure to the "OnClick" button's event, then, in
the code of this procedure, type
Edit1.SetFocus;
Compile, run and enjoy ;-)
That will probably work OK. But I have had some problems setting focus of
one control from another's onClick event. At the very least, make sure the
SetFocus is the last line of the onClick handler. Otherwise, maybe the
SetFocus should be in an OnMouseUp event, or even better, OnBlur or
OnLoseFocus, if those are available. It's been awhile since I worked with
those issues, or even Delphi itself.
Paul