?
Solved

inplace-editor of TDBGrid

Posted on 1997-05-20
2
Medium Priority
?
595 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
[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
2 Comments
 
LVL 3

Accepted Solution

by:
sperling earned 300 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month15 days, 6 hours left to enroll

741 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