Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ShowModal problem

0 views
Skip to first unread message

Studebaker

unread,
Dec 5, 1998, 3:00:00 AM12/5/98
to
I am using Delphi 1.

When using SHOW for a form that pops up when invalid
data was corrected, I do not experience any problems
when I close it. When I use ShowModal however, you
have to <shift-TAB> to get the MaskEdit box active
again.

Why is this? Can the problem be solved. Any sggestions
and or solutions are welcomed...

Thanking you all in advance
--

__________
Studebaker

Matthias Thiel

unread,
Dec 7, 1998, 3:00:00 AM12/7/98
to
Studebaker schrieb in Nachricht <01be2038$7a3b0be0$b2401fc4@lexlines>...
If I really got you the problem is loosing the focus after closing the form?
Is it, because you're using a button to close the window?
By pressing the button the MaskEdit looses the focus and next time you open
the window
he still got the focus.
In this case it would help you to use the OnShow event and this code in
there:
procedure YourForm.FormShow(Sender: TObject);
begin
ActiveControl:=YourMaskEdit;
end;

Hth,
Matthias.

PALFREYMAN

unread,
Dec 11, 1998, 3:00:00 AM12/11/98
to
Showing the form modal will set the active focus to the form. In the modal
form's FormShow procedure use the following :

Maskedit.Setfocus;

Where MaskEdit is whatever you called your mask edit box.

Regards

Neil Palfreyman

0 new messages