Board index » delphi » Text disappearing from edit fields during edit

Text disappearing from edit fields during edit

I have discovered that a project I am working on exibits strange
behaviour in all edit fields.  If the user highlights text and presses
delete, the entire contents disappear.  This happens in Edit, DBedit,
and DBmemo.  Hitting escape then takes the state of the text back to
where it was. However if the text is highlighted and then backspace is
pressed, only the selected text dissapears.

This happens in all edit fields, in all forms in ths project.  Pevious
projects do not do this.  I have apparently changes some default
behavior, but cannot see what.

I have recently moved to Delphi 5, but other projects begun using
similar technique do not exibit this problem - Help would be greatly
appreciated, as this app was deployed before I discovered the problem,
and the users are not impressed.

I posted a request for help re DBMemo a few days ago - This is an update
of that

Thanks - Phil Stephens

 

Re:Text disappearing from edit fields during edit


On Sun, 23 Jan 2000 11:35:40 +1100, "Philip A. Stephens"

Quote
<pstep...@mail.usyd.edu.au> wrote:

Try using edit.update after the delete.
Quote
>I have discovered that a project I am working on exibits strange
>behaviour in all edit fields.  If the user highlights text and presses
>delete, the entire contents disappear.  This happens in Edit, DBedit,
>and DBmemo.  Hitting escape then takes the state of the text back to
>where it was. However if the text is highlighted and then backspace is
>pressed, only the selected text dissapears.

>This happens in all edit fields, in all forms in ths project.  Pevious
>projects do not do this.  I have apparently changes some default
>behavior, but cannot see what.

>I have recently moved to Delphi 5, but other projects begun using
>similar technique do not exibit this problem - Help would be greatly
>appreciated, as this app was deployed before I discovered the problem,
>and the users are not impressed.

>I posted a request for help re DBMemo a few days ago - This is an update
>of that

>Thanks - Phil Stephens

Re:Text disappearing from edit fields during edit


Quote
In article <388A4CDC.6F3AA...@mail.usyd.edu.au>, Philip A. Stephens wrote:
> I have discovered that a project I am working on exibits strange
> behaviour in all edit fields.  If the user highlights text and presses
> delete, the entire contents disappear.  This happens in Edit, DBedit,
> and DBmemo.  Hitting escape then takes the state of the text back to
> where it was. However if the text is highlighted and then backspace is
> pressed, only the selected text dissapears.

This sounds as if you have a main menu item somewhere that has the DEL key
as shortcut and is wired to a TEditDelete action item. TEditDelete has a
bug, its ExecuteAction method calls the Clear method of the active control
instead of ClearSelection.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!

Sent using Virtual Access 5.00 - download your freeware copy now
http://www.atlantic-coast.com/downloads/vasetup.exe

Re:Text disappearing from edit fields during edit


That did it - Many thanks (First time out with TeditList) It was becoming a
real hair tearer, and I dont have much of same left.  - Phil Stephens
Quote
"Peter Below (TeamB)" wrote:
> In article <388A4CDC.6F3AA...@mail.usyd.edu.au>, Philip A. Stephens wrote:
> > I have discovered that a project I am working on exibits strange
> > behaviour in all edit fields.  If the user highlights text and presses
> > delete, the entire contents disappear.  This happens in Edit, DBedit,
> > and DBmemo.  Hitting escape then takes the state of the text back to
> > where it was. However if the text is highlighted and then backspace is
> > pressed, only the selected text dissapears.

> This sounds as if you have a main menu item somewhere that has the DEL key
> as shortcut and is wired to a TEditDelete action item. TEditDelete has a
> bug, its ExecuteAction method calls the Clear method of the active control
> instead of ClearSelection.

> Peter Below (TeamB)  100113.1...@compuserve.com)
> No e-mail responses, please, unless explicitly requested!

> Sent using Virtual Access 5.00 - download your freeware copy now
> http://www.atlantic-coast.com/downloads/vasetup.exe

Re:Text disappearing from edit fields during edit


That did it - Many thanks (First time out with TeditList) It was becoming a
real hair tearer, and I dont have much of same left.  - Phil Stephens
Quote
"Peter Below (TeamB)" wrote:
> In article <388A4CDC.6F3AA...@mail.usyd.edu.au>, Philip A. Stephens wrote:
> > I have discovered that a project I am working on exibits strange
> > behaviour in all edit fields.  If the user highlights text and presses
> > delete, the entire contents disappear.  This happens in Edit, DBedit,
> > and DBmemo.  Hitting escape then takes the state of the text back to
> > where it was. However if the text is highlighted and then backspace is
> > pressed, only the selected text dissapears.

> This sounds as if you have a main menu item somewhere that has the DEL key
> as shortcut and is wired to a TEditDelete action item. TEditDelete has a
> bug, its ExecuteAction method calls the Clear method of the active control
> instead of ClearSelection.

> Peter Below (TeamB)  100113.1...@compuserve.com)
> No e-mail responses, please, unless explicitly requested!

> Sent using Virtual Access 5.00 - download your freeware copy now
> http://www.atlantic-coast.com/downloads/vasetup.exe

Other Threads