View Issue Details

IDProjectCategoryView StatusLast Update
0008491LazarusLCLpublic2011-11-21 17:47
ReporterBart BroersmaAssigned ToZeljan Rikalo 
Status closedResolutionsuspended 
Platformi386OSSuse LinuxOS Version10.0
Product Version0.9.20Product Build 
Target Version1.0.0Fixed in Version 
Summary0008491: TEdit.OnChange is fired if text is not changed (after pressing delete or backspace) in Linux
DescriptionIf you press Delete or Backspace in a TEdit control then the OnChange event is fired wether or not the text is actually changed.
This happens in Linux, not in Win32.
Steps To ReproducePlace a TEdit control on a form
Let it's OnChange event do something trivial
Build and run
In the empty TEdit press BackSpace or Delete

Expected behaviour
- nothing happens

Observed behaviour
- The OnChange event is fired
Additional Informationin:
procedure TControl.RealSetText(const Value: TCaption);
  if FCaption = Value then Exit;
  //the above line should prevent this from happening as far as I can see
  //but if it should, it clearly does not

  FCaption := Value;

  //TextChanged sets Modified to true and then calls Change,
  //which then fires OnChange if it is assigned

As far as I can see non of the GetText / SetText methods for TEdit are overridden, so TEdit.SetText should call TControl.RealSetText.

There may well be a relation with bug 0007243.
TagsNo tags attached.
Fixed in Revision
Attached Files


related to 0007243 closedZeljan Rikalo TEdit SelStart behaves different (incorrectly) under linux 


Vincent Snijders

2007-03-09 20:45

manager   ~0011785

RealSetText is called when the programmer changes the text, not when the widgetset changes the text because of user interaction.

Bart Broersma

2007-03-15 18:30

developer   ~0011870

Well, I hav no clue then as to how this works.
But can it be fixed (I mean is it even possible then?). Is it in "our" (Laz/fpc) code, or does the OS do this to us?
If it cannot be fixed, then having a reliable "The contents have changed, do you want to save?" warning in any text editor is not gonna be possible if it relies on the Modified property.
(Well, one can always try to work around it of course)

Zeljan Rikalo

2010-03-10 11:25

developer   ~0035151

Works ok with gtk2. Suspended since it's gtk only.

Issue History

Date Modified Username Field Change
2007-03-09 19:58 Bart Broersma New Issue
2007-03-09 19:58 Bart Broersma Widgetset => GTK
2007-03-09 20:43 Vincent Snijders Relationship added related to 0007243
2007-03-09 20:45 Vincent Snijders LazTarget => 1.0
2007-03-09 20:45 Vincent Snijders Note Added: 0011785
2007-03-09 20:45 Vincent Snijders Status new => acknowledged
2007-03-15 18:30 Bart Broersma Note Added: 0011870
2008-04-24 09:57 Vincent Snijders Target Version => 1.0.0
2010-03-10 11:25 Zeljan Rikalo Status acknowledged => resolved
2010-03-10 11:25 Zeljan Rikalo Resolution open => suspended
2010-03-10 11:25 Zeljan Rikalo Assigned To => Zeljan Rikalo
2010-03-10 11:25 Zeljan Rikalo Note Added: 0035151
2011-11-21 17:47 Zeljan Rikalo Status resolved => closed