i would like to change to gray color of the Texthint of my TEdits.
I allready found this https://stackoverflow.com/a/31550017/1862576 and tried to change to color via SendMessage like this
procedure TEdit.DoSetTextHint(const Value: string);
var
Font: TFont;
begin
if CheckWin32Version(5, 1) and StyleServices.Enabled and HandleAllocated then
begin
Font := TFont.Create;
try
Font.Assign(self.Font);
Font.Color := clGreen;
Font.Size := 20;
SendTextMessage(Handle, EM_SETCUEBANNER, WPARAM(1), Value);
SendMessage(Handle, WM_SETFONT, Integer(Font.Handle), Integer(True));
finally
// Font.Free;
end;
end;
end;
It changes the size of the font but not the color. Thanks for your help.