Subject Re: [IBO] Re: Prevent grid from getting into "edit" mode
Author Daniel Albuschat
Hello Mihai,

On Thu, Jul 22, 2004 at 10:27:40AM -0000, Mihai Chezan wrote:
> You could try this:
> on the OnGetText event of the grid:
> procedure TFormXXX.GridXXXGetEditText(Sender: TObject; ACol,
> ARow: Integer; var Value: String);
> begin
> if (ACol = your_column) then
> GridXXX.EditorMode := false;
> end;
> I've tested it and it seems to work - to prevent the edit caret appear
> when you double click the column (or hit enter).

Yep, this does work. Thanks.

> ps: I've just discovered this by trial and error since I don't know
> what EditorMode does (no help for it)

Well I'll just use it for now, perhaps someone else comes up
with another idea. Thanks for your effort.

There pops up another question: I've inserted a constant for
your_column so far, but this of course may be variable since
the user can change the order of the columns in the grid.
In my example, the user can take a column with some text in it,
drag it to the position where the icon was first, and the icon
will be drawn over the text.
Is there an event I can jump in to recognize the change of column

Daniel Albuschat

eat(this); // delicious suicide