Forum > LCL

TComboBox.ReadOnly replacement

(1/2) > >>

Milsa:
I am using Lazarus 1.8.4 and my project uses TcomboBox.ReadOnly property.

I will upgrade to 2.0 but I read this:
http://wiki.lazarus.freepascal.org/Lazarus_2.0.0_release_notes part TCustomComboBox.ReadOnly was deprecated

How do I replace this property in my code?

lucamar:
The note itself offers a sugestion:

--- Quote ---Remedy: Use extended styles for the same feature.
--- End quote ---

from which I conclude that you must do (in code or in the object inspector):

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---MyComboBox.Style := csDropDownList;
which style, acording to the documentation, means:


--- Quote ---csDropDownList: The box has a drop-down list, from which entries can be selected (manual text entry disabled).
--- End quote ---

Milsa:
I am using autocomplete with dropdown list too. It is possible to use it with readwrite mode?

lucamar:
I think it's possible, yes. But try it and make sure yourself :)

Milsa:
I have old version. I will edit project after update Lazarus to 2.0. I will update later. I need any time for project changes.

Navigation

[0] Message Index

[#] Next page

Go to full version