如何在FireMonkey中更改“编辑”控件的背景色? [英] How to change Edit control background color in FireMonkey?
本文介绍了如何在FireMonkey中更改“编辑”控件的背景色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我只是无法在移动FireMonkey应用程序中找到一种方法来更改编辑控件的背景颜色。
I just can't find a way of changing background color of Edit control in my mobile FireMonkey application.
推荐答案
我不了解移动版FMX,但是在Mac / Win版FMX中,您应该执行以下步骤:
I dont know about FMX for mobile, but in FMX for Mac/Win you should do following steps:
- 右键单击TEdit并选择编辑自定义样式
- 在结构窗口中,展开 editstyle (TLayout)
- 在 content 上放置一个TRectangle(TRectangle成为内容的子代)
- 将Rectangle.HitTest更改为False
- 将Rectangle.Align更改为alClient
- 将Rectangle.Fill.Color更改为自定义颜色
- 将Rectangle.Stroke.Kind更改为bkNone
- 应用并关闭
- 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
这篇关于如何在FireMonkey中更改“编辑”控件的背景色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文