Forum > LCL

[SOLVED] Edit and text Highlights

(1/1)

superc:
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:
After SetFocus add something like this:

--- 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";}};} ---YourEditName.SelStart := Length(YourEditName.Text);YourEditName.SelLength := 0; 

superc:
Works fine, Thank you.

Navigation

[0] Message Index

Go to full version