delphi - 如何更改 FireMonkey 中的编辑控件背景颜色?

标签 delphi firemonkey delphi-xe4

我只是找不到更改移动 FireMonkey 应用程序中编辑控件背景颜色的方法。

最佳答案

我不知道移动版 FMX,但在 Mac/Win 版 FMX 中您应该执行以下步骤:

  1. 右键单击“TEdit”并选择“编辑自定义样式”
  2. 在“结构”窗口中,展开editstyle (TLayout)
  3. 将 TRectangle 放在内容上(TRectangle 成为内容的子项)
  4. 将 Rectangle.HitTest 更改为 False
  5. 更改 Rectangle.Align 至 alClient
  6. 将 Rectangle.Fill.Color 更改为自定义颜色
  7. 将 Rectangle.Stroke.Kind 更改为 bkNone
  8. 申请并关闭

enter image description here enter image description here

关于delphi - 如何更改 FireMonkey 中的编辑控件背景颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18447029/

相关文章:

c++ - 将 CreateProcess 与通过 bat 文件设置的环境变量一起使用

python - Lazarus 库在 OSX 的 Python 中使用 ctypes

ios - 德尔福 + iOS : How to declare simple ObjC-Class?

ios - 如何设置TPanel透明?

ios - TAniIndicator 在执行操作时没有动画。

ios - XE4获取磁盘总大小

windows - 我的 32 位应用程序可以做什么来消耗数 GB 的物理 RAM?

delphi - TFileStream.WriteBuffer XE4 VS XE7

delphi - 文本布局类不适用于打印机

delphi - 将 float ">="转换为 ">",将 "<="转换为 "<"