View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0032321||Lazarus||LCL||public||2017-08-23 12:21||2017-12-14 22:00|
|Status||resolved||Resolution||no change required|
|Summary||0032321: TEdit / TDbEdit cursor position after overwrite text|
|Description||Hello, with Lazarus 1.8.0.RC3 under Linux 64 bit there is a problem with TEdit and TDbEdit: when I put this code in the Enter Event:|
Edit1.SelStart := 0;
Edit1.SelLength := Length (Edit1.Text);
in order to automatically select all the text when the user goes on the TEdit, if the user press a key, the letter is ok and replace the previous text, but the second letter pressed from the user is written before and not after the first letter.
The first letter inserted by the user remains always at the end of the TEdit / TDbEdit, if the user doesn't move manually the cursor.
The problem occours only with letters and not with numbers.
Sorry for my bad english.
|Tags||No tags attached.|
|Fixed in Revision|
|related to||0023131||resolved||Juha Manninen||[GTK2+Windows] Backspace on TEdit moves cursor one position to the right|
|related to||0030596||resolved||Juha Manninen||error in the keyboard backspace key on linux TEdit|
|related to||0024371||resolved||Juha Manninen||Wrong usage of SelStart and SelLength in OnChange event only the first time|
|related to||0025978||assigned||Zeljan Rikalo||Select text with mouse from right to left has problems under GTK2|
test.zip (1,833 bytes)
This isn't a bug per se. The event OnEnter is not good. The control isn't ready for such changes. Just tested, it doesn't work with Win32, GTK2, Qt.
You can use a asynchron method call. I add a simple test app to show you, what you can do (tested with Win32, GTK2, Qt). You can there select a TEdit per mouse or key (key only: property AutoSelect = True should be enough).
Please close, if all is clear. Please reopen, if I miss the point of that bug report (than please add a minimal example).
With version 1.8.0 of Lazarus it seems to work now correctly (the code in the OnEnter event hasn't however changed).
|2017-08-23 12:21||Stephanie||New Issue|
|2017-08-25 10:13||Juha Manninen||Relationship added||related to 0023131|
|2017-08-25 10:15||Juha Manninen||Relationship added||related to 0030596|
|2017-08-25 10:18||Juha Manninen||Relationship added||related to 0024371|
|2017-08-25 10:33||Juha Manninen||Relationship added||related to 0025978|
|2017-09-21 20:21||Michl||File Added: test.zip|
|2017-09-21 20:21||Michl||LazTarget||=> -|
|2017-09-21 20:21||Michl||Note Added: 0102964|
|2017-09-21 20:21||Michl||Status||new => resolved|
|2017-09-21 20:21||Michl||Resolution||open => no change required|
|2017-09-21 20:21||Michl||Assigned To||=> Michl|
|2017-12-14 22:00||Stephanie||Note Added: 0104722|