Author: Erwin Molendijk
I want to set Enabled=False in my TMemo, but I don't want the text to turn gray.
Answer:
OPTION 1:
Ok, this is a dirty trick. But is works fine for me.
Set the Enabled to True (yes realy).
In the OnEnter event of your memo put:
1 procedure TForm1.MyMemoEnter(Sender: TObject);
2 begin3 SomeOtherControl.SetFocus;
4 end;
Now, focus will be forced to some other control every time your user tries to fucus
on your memo. To the user it seems that the memo is disabled.
OPTION 2:
This one is much simpler:
Put the memo on a panel. Then set Panel.Enabled=False.
Ok, this works if you can put the memo on a panel. Just with inherited forms you can get into some trouble. But is should work for most people.