3
votes

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

1
Please supply Delphi version. FMX is very fluid between versions. You'll need to learn about FMX styles. A web search should reveal what you need. - David Heffernan
Thats Embarcadero® Delphi® XE4 Version 18.0.4905.60485 - Edijs Kolesnikovičs
I've edited the question to add that as a tag. That's the way to do it, for future reference. - David Heffernan
I have version in the title. - Edijs Kolesnikovičs
@EdijsKolesnikovičs StackOverflow works quite well when you put your Delphi version in the tags. It tends to clutter space when you put it in the title. - Jerry Dodge

1 Answers

7
votes

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 hereenter image description here