View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032669 | Packages | LCL | public | 2017-11-11 02:43 | 2018-09-05 17:40 |
Reporter | tomitomy | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | Linux | OS | Linux Mint MATE 64-Bit | ||
Product Version | 1.8RC4 | ||||
Summary | 0032669: OnChange event couldn‘t be triggered correctly when using Memo1.ClearSelection | ||||
Description | In Linux, Memo1.ClearSelection doesn't trigger OnChangeEvent after Memo1.SelectAll, but it is normal in Windows. | ||||
Steps To Reproduce | In the code below, Button1 triggers the OnChange event correctly, but Button2 doesn't trigger the OnChange event: ------------------------------ procedure TForm1.Memo1Change(Sender: TObject); begin writeln(Now); end; procedure TForm1.Button1Click(Sender: TObject); begin Memo1.SelStart := 2; Memo1.SelLength := 3; Memo1.ClearSelection; end; procedure TForm1.Button2Click(Sender: TObject); begin Memo1.SelectAll; Memo1.ClearSelection; end; ------------------------------ | ||||
Tags | No tags attached. | ||||
Fixed in Revision | |||||
LazTarget | |||||
Widgetset | GTK 2 | ||||
Attached Files |
|
related to | 0031618 | closed | Juha Manninen | Lazarus | TSpinEdit.OnChange events in GTk2 |
|
if TMemo is empty, then SelText := something will not trigger OnChange event also. My program will detect whether the content of TMemo has been changed when close the form, then prompt the user to save the data, if the OnChange event does not triggered after the content changed, in the form closing time, may cause loss of data. |
|
|
|
I added a test file "Onchange abnormal triggering.zip" |
|
The OnChange event is not triggered when Memo1.Text is empty and you assign a non-empty string into Memo1.Text *programmatically*. See second paragraph in: http://forum.lazarus.freepascal.org/index.php/topic,39527.msg271671.html#msg271671 (Tested in Ubuntu 17.10 + Lazarus 1.8.0.) It is working normally in Windows. |
|
I am sorry to see that this bug is not addressed in version 1.8.2 of Lazarus. |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-11-11 02:43 | tomitomy | New Issue | |
2017-11-12 15:06 | tomitomy | Note Added: 0104034 | |
2017-12-06 12:26 | tomitomy | File Added: Onchange abnormal triggering.zip | |
2017-12-06 12:27 | tomitomy | Note Added: 0104523 | |
2018-01-04 14:40 | Fedon Kadifeli | Note Added: 0105321 | |
2018-03-06 17:28 | Fedon Kadifeli | Note Added: 0106956 | |
2018-09-05 17:40 | Juha Manninen | Relationship added | related to 0031618 |