I have tried:
InplaceCB.Editor.OnChange := InplaceCBEditorChange;
procedure TMainForm.InplaceCBEditorChange(Sender: TObject);
begin
with ItemTree.ItemFocused.Cells[INDEX_Group] do
begin
if InplaceCB.Items.IndexOf(InplaceCB.Editor.Text) >= 0 then
begin
UseOwnStyle := False;
end
else
begin
UseOwnStyle := True;
with Style do
begin
TextAlignment := taLeftJustify;
ParentColors := False;
UseBackGroundColor := True;
CellBackGroundColor := ColourOrchid2;
end;
end;
end;
end;
but that only colours the cell after exiting the cell.
I have tried
InplaceCB.Editor.OnKeyDown := InplaceCBEditorKeyDown;
with exactly the same code, but that does not change the background colour.
The latter Notify Event is called and the code is executed, but the colour does not change.
How is this to be done?
Thanks.
Raymond
Comments