Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change Edit control background color in FireMonkey?

I just can't find a way of changing background color of Edit control in my mobile FireMonkey application.

like image 867
Edijs Kolesnikovičs Avatar asked Oct 15 '25 04:10

Edijs Kolesnikovičs


1 Answers

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

enter image description here enter image description here

like image 109
mh taqia Avatar answered Oct 18 '25 05:10

mh taqia



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!