问题
I just can't find a way of changing background color of Edit control in my mobile FireMonkey application.
回答1:
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
来源:https://stackoverflow.com/questions/18447029/how-to-change-edit-control-background-color-in-firemonkey