Recent

Author Topic: Meaning of ReadOnly property in TEdit  (Read 800 times)

simone

  • Full Member
  • ***
  • Posts: 123
Meaning of ReadOnly property in TEdit
« on: May 05, 2018, 12:38:52 pm »
I noticed that in a TEdit control, I can change the Text property via code even if ReadOnly is set to True. This setting only prevents the user from changing the text. Is this by design? Thanks for support.

wp

  • Hero Member
  • *****
  • Posts: 5156
Re: Meaning of ReadOnly property in TEdit
« Reply #1 on: May 05, 2018, 01:40:14 pm »
Yes.
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

Blaazen

  • Hero Member
  • *****
  • Posts: 2682
  • POKE 54296,15
    • Eye-Candy Controls
Re: Meaning of ReadOnly property in TEdit
« Reply #2 on: May 05, 2018, 02:58:28 pm »
With ReadOnly, you can still focus TEdit, select text and use Ctrl+C. Useful.
Lazarus 2.1.0 r59757M FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.11.2, Plasma 5.14.2
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/