如何在FireMonkey中更改“编辑”控件的背景色? [英] How to change Edit control background color in FireMonkey?

查看:193
本文介绍了如何在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:


  1. 右键单击TEdit并选择编辑自定义样式

  2. 在结构窗口中,展开 editstyle (TLayout)

  3. content 上放置一个TRectangle(TRectangle成为内容的子代)

  4. 将Rectangle.HitTest更改为False

  5. 将Rectangle.Align更改为alClient

  6. 将Rectangle.Fill.Color更改为自定义颜色

  7. 将Rectangle.Stroke.Kind更改为bkNone

  8. 应用并关闭

  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


这篇关于如何在FireMonkey中更改“编辑”控件的背景色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆