How to change Edit control background color in FireMonkey?

半城伤御伤魂 提交于 2020-01-02 06:21:27

问题


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:

  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



来源:https://stackoverflow.com/questions/18447029/how-to-change-edit-control-background-color-in-firemonkey

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!