Solved

inplace-editor of TDBGrid

Posted on 1997-05-20
2
587 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
ID: 1336503
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
ID: 1336504
Thanks a lot for your answer.  I'll try it as you say.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

862 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

25 Experts available now in Live!

Get 1:1 Help Now