I just can't find a way of changing background color of Edit control in my mobile FireMonkey application.
3
votes
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:
- Right click on TEdit and select Edit Custom Style
- In Structure window, expand editstyle (TLayout)
- Put a TRectangle on content (TRectangle becomes child of content)
- Change Rectangle.HitTest to False
- Change Rectangle.Align to alClient
- Change Rectangle.Fill.Color to a custom color
- Change Rectangle.Stroke.Kind to bkNone
- Apply and Close

