How to change Edit control background color in FireMonkey?

Edijs Kolesnikovičs picture Edijs Kolesnikovičs · Aug 26, 2013 · Viewed 13.2k times · Source

I just can't find a way of changing background color of Edit control in my mobile FireMonkey application.

Answer

mh taqia picture mh taqia · Aug 27, 2013

I dont know about FMX for mobile, but in FMX for Mac/Win you should do following steps:

  1. Right click on TEdit and select Edit Custom Style
  2. In Structure window, expand editstyle (TLayout)
  3. Put a TRectangle on content (TRectangle becomes child of content)
  4. Change Rectangle.HitTest to False
  5. Change Rectangle.Align to alClient
  6. Change Rectangle.Fill.Color to a custom color
  7. Change Rectangle.Stroke.Kind to bkNone
  8. Apply and Close

enter image description here enter image description here