RE: TZF - not only a Topaz Problem Edit restriction
"Samuel J. Godfrey" <[email protected]> Fri, 8 Aug 2003 11:10:54 -0400
| Newsgroups | gmane.comp.lang.delphi.topaz |
|---|---|
| Message-ID | <[email protected]> |
Pierre:
I may not be understanding your problem correctly. You have an editmask on a data bound component. Or, is it just a maskedit. Either way, you want to exit that component based on a key that has been pressed. Have you tried using the key down event like so:
procedure TForm1.TzMaskEdit1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Key = 40 then //key 40 is the down arrow
SelectNext(ActiveControl as tWinControl, TRUE, TRUE);
end;
and not changing the mask properties on exit or enter. It seems to work in a data bound control and non data bound control with mask edits.
S. Jason Godfrey
-----Original Message-----
From: Pierre Wittwer [mailto:[email protected]]
Sent: Friday, August 08, 2003 10:30 AM
To: [email protected]
Subject: Re: TZF - not only a Topaz Problem Edit restriction
To Samuel and the Borland tip. There is a restriction
Maybe you make (as in the example of Boland) > if not (Key in [#8,
'0'..'9', '-', DecimalSeparator]) then .....
In the input you can delete a char and then exit, e.g. by clicking another
button, then I get this EDBEditerror again
Is the onexit event the latest possibility to control the content of the
Edit.text
I tried this onexit with
procedure TForm1.MaskEdit1Exit(Sender: TObject);
var
r : real;
i : integer;
begin
val(maskedit1.Text,r,i);
if i<>0 then maskedit1.SetFocus;
end;
but with no success.
How can I stay on the maskEdit Focus
Thanks for your further help
Pierre Wittwer
CH Stans
> > Can you help me
> >
> > Pierre Wittwer
> > Stansstad
> > Switzerland
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>
--^----------------------------------------------------------------
This email was sent to: [email protected]
EASY UNSUBSCRIBE click here: http://topica.com/u/?clvXPN.a5jSEu.c2pnb2Rm
Or send an email to: [email protected]
TOPICA - Start your own email discussion group. FREE!
http://www.topica.com/partner/tag02/create/index2.html
--^----------------------------------------------------------------
--^----------------------------------------------------------------
This email was sent to: [email protected]
EASY UNSUBSCRIBE click here: http://topica.com/u/?clvXPN.a5kvff.Z2NsZHQt
Or send an email to: [email protected]
TOPICA - Start your own email discussion group. FREE!
http://www.topica.com/partner/tag02/create/index2.html
--^----------------------------------------------------------------