[Lazarus] TComboBox.ReadOnly
Ondrej Pokorny
lazarus at kluug.net
Sat May 2 10:37:15 CEST 2020
On 02.05.2020 09:00, Juha Manninen via lazarus wrote:
> On Sat, May 2, 2020 at 9:09 AM Ondrej Pokorny via lazarus
> <lazarus at lists.lazarus-ide.org <mailto:lazarus at lists.lazarus-ide.org>>
> wrote:
>
> From what I can see the ReadOnly property is still published. I would
> remove it completely, there is no reason to have it anymore if it was
> deprecated for 3 years. Not even in the public section. (Again, even
> with ReadOnly=True you can still change the value with the drop down.)
>
>
> No, the published property is gone. You must rebuild the IDE before it
> disappears from OI.
> There is a public TCustomComboBox.ReadOnly
Yes, sorry - you are right. I missed that. I would just remove it.
> This works in Lazarus as well:
>
> procedure TForm1.Button1Click(Sender: TObject);
> begin
> // make combobox read-only (make sure ComboBox1.Style=csDropDown)
> SendMessage(GetWindow(ComboBox1.Handle, GW_CHILD), EM_SETREADONLY,
> Ord(True), 0);
> end;
>
>
> Works only with LCL-Win32.
That's obvious :) I wanted to stress that we never had a ReadOnly
property Jamie wanted so there was nothing to be re-enabled. Also,
Delphi never had it so he was wrong about "I understand latest Delphi
eliminated it [ReadOnly property]".
Ondrej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20200502/afcc6dc5/attachment-0001.html>
More information about the lazarus
mailing list