Re: TZF - not only a Topaz Problem Edit restriction

Homer <[email protected]> Fri, 8 Aug 2003 16:15:51 -0700
Newsgroups gmane.comp.lang.delphi.topaz
Message-ID <[email protected]>
This is related, but slightly off topic.  Delphi encloses strings in single
quotes. It is the same as an apostrophe (') which is used in many business
names (and other places). For example: North America's best apple pie.  I
have just started making substitutions such as:

If Key = 39 then key := 96;

The resulting ASCII 96 (`) looks like an apostrophe, but it doesn't cause
problems in SQL statements and other "enclosed" literals. I started this
because the function; QuotedString sometimes doesn't work.





Agency Business Systems, Inc.
(503) 659 6752
www.AgencyBusinessSystems.com
--------------------------------------------------------------
"If you want a better answer,
  ask a better question." -- Unknown.
----- Original Message ----- 
From: "Pierre Wittwer" <[email protected]>
To: <[email protected]>
Sent: Friday, August 08, 2003 2:38 PM
Subject: Re: TZF - not only a Topaz Problem Edit restriction


> To Samuel
>
> Thanks for your help. I solved the problem as follows
>
> procedure TForm1.MaskEdit1KeyDown(Sender: TObject; var Key: Word;
>   Shift: TShiftState);
> begin
>   if key=46 then begin   // delete key
>     showmessage('Key '+IntToStr(key));
>     key:=0;    // pass in key=0 to disregard the key after it's use
>   end;
> end;
>
> Bye
>
> Pierre Wittwer
> Stansstad
> Switzerland
>
>
>
> ----- Original Message -----
> From: "Samuel J. Godfrey" <[email protected]>
> To: <[email protected]>
> Sent: Friday, August 08, 2003 5:10 PM
> Subject: RE: TZF - not only a Topaz Problem Edit restriction
>
>
> > 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.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
--^----------------------------------------------------------------