[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Keyboard Insert Key (Overwrites) doesn't work

Posted on 2001-07-25
7
Medium Priority
?
566 Views
Last Modified: 2010-05-18
It seems that the TEdit doesn't recognise the keyboard insert key (toggle to overwrite/insert), it is always in
insert state!

Can anyone help?

Thanks.



0
Comment
Question by:llkhor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 27

Assisted Solution

by:kretzschmar
kretzschmar earned 100 total points
ID: 6320969
you've to check this byself

you could do this on the keyup event using the keystate-api
if overwrite is set just set the sellength of the tedit to 1


meikl ;-)
0
 
LVL 4

Accepted Solution

by:
jsweby earned 100 total points
ID: 6321620
To elaborate on meikl's answer, from the Borland Community (just use Edit instead of Memo):

The Windows TEdit and TMemo controls have no overwrite capability. It is possible to emulate this behavior however, by setting the SelLength property of the edit or memo control to one during the processing of the KeyPress event. This causes the character at the current position of the caret to be overwritten.

The following example demonstrates emulation of an overwrite capability of a TMemo component. The state of the overwrite mode can be toggled by pressing the insert key.

Example:

type
  TForm1 = class(TForm)
    Memo1: TMemo;
    procedure Memo1KeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    procedure Memo1KeyPress(Sender: TObject; var Key: Char);
  private
    { Private declarations }
    InsertOn : bool;
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Memo1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  if (Key = VK_INSERT) and (Shift = []) then
    InsertOn := not InsertOn;
end;

procedure TForm1.Memo1KeyPress(Sender: TObject; var Key: Char);
begin
  if ((Memo1.SelLength = 0) and
      (not InsertOn)) then
    Memo1.SelLength := 1;
end;

J.
0
 

Author Comment

by:llkhor
ID: 6357838
thanks for your feedback. :-)
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 26

Expert Comment

by:Russell Libby
ID: 8733784
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

To split points between kretzschmar and jsweby

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Thank you,
Russell

EE Cleanup Volunteer
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 8733837
hi russell,

you are quite busy,
guessing i should begin too

can i ask you, where you provide the links
of the questions you have already tagged?

meikl ;-)
0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 8733995

Meikl,

A little busy, only have 3 wks worth of q's to look at now... ;-)

I have been keeping the list in notepad currently, then when the final list/assignment is complete we are supposed to post them at:

http://www.experts-exchange.com/Community_Support/CleanUp

In a format that is similar to
-----------------------------------

http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20136904.html 
- To be deleted and points refunded

http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20137079.html -
To be deleted and points refunded

http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20137464.html -
PAQ/Refund

http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20137508.html -
To be deleted and points refunded

-----

If I misunderstood, and you want to SEE the list i have so far, let me know and I can post it for you.


Best Regards,
Russell

0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question