Forum > LCL
[Solved] How to unselect the text in a focused TEdit, programmatically
jamie:
--- Quote from: paweld on December 01, 2024, 07:07:37 am ---
--- Quote from: jamie on December 01, 2024, 12:14:50 am ---
--- 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";}};} ---procedure TForm1.Edit1Enter(Sender: TObject);begin Exit; With TEdit(Sender) do Begin SelStart := CaretPos.X; SelLength := 0; end;end;
--- End quote ---
@jamie: anything after exit will not be executed
--- End quote ---
U r correct. I pasted the wrong code. I placed the exit there as test and forgot to remove it for post.
Shameful sin on my part :(
Navigation
[0] Message Index
[*] Previous page