[SOLVED] Edit and text Highlights lazarus / 31-LCL ---------------------------------------------------------------------- superc · 2022-04-29 07:48 Hello, I have a stupid problem that I can't solve; in my program I've a edit for search and when user insert a text start a timer of 500ms and if user enter new keys timer stop and restart: when timer execute onTimer events, edit lose focus and after with setfocus all text are highlighed as in the image; how can I solve the problem? Thanks in advance. ---------------------------------------------------------------------- dseligo · 2022-04-29 07:54 After SetFocus add something like this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i YourEditName.SelStart := Length(YourEditName.Text);YourEditName.SelLength := 0; ---------------------------------------------------------------------- superc · 2022-04-29 07:58 Works fine, Thank you.