Solved

inplace-editor of TDBGrid

Posted on 1997-05-20
2
585 Views
Last Modified: 2010-04-04
I'm trying to write an enhanced version of TDBGrid, called TEDBGrid.  One of key features is that display a bitmap when Boolean field for True and another bitmap for False, and toggle it's value through space.  I can display bitmaps, toggle values by keypress successfully, but it will display the textual True or False before my drawing.  This is due to the inplace-edit object of the parent class, and this object is encapslated, so I can't access it directly.  Unfortunately, the inplace-editor is needed to commit my data change by emulate a Enter key.

So, my question is how to make the inplace-editor  respon to my key press and bypass the screen redraw?
0
Comment
Question by:alsan
2 Comments
 
LVL 3

Accepted Solution

by:
sperling earned 150 total points
Comment Utility
If you need to access TInplaceEdit, you must override TCustomGrid.CreateEditor, and do something like this:

function TEDBGrid.CreateEditor: TInplaceEdit;
begin
  FAnotherPointerToEditor := inherited CreateEditor;
  Result := FAnotherPointerToEditor;
end;


You could ofcourse also create a descendant of TInplaceEdit in CreateEditor and return that, giving you all the control of the editor you need.


Regards, Erik.



0
 

Author Comment

by:alsan
Comment Utility
Thanks a lot for your answer.  I'll try it as you say.

0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
This video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now