mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 00:40:18 +02:00
ValEdit: override TValueListStrings.SetTextStr: Don't show editor while changing values. Edited cell would not be changed.
git-svn-id: trunk@39469 -
This commit is contained in:
parent
9f01fe7db9
commit
bca930e0c9
@ -16,6 +16,8 @@ type
|
||||
TValueListStrings = class(TStringList)
|
||||
private
|
||||
FOwner: TValueListEditor;
|
||||
protected
|
||||
procedure SetTextStr(const Value: string); override;
|
||||
public
|
||||
constructor Create(AOwner: TValueListEditor);
|
||||
destructor Destroy; override;
|
||||
@ -206,6 +208,20 @@ implementation
|
||||
|
||||
{ TValueListStrings }
|
||||
|
||||
procedure TValueListStrings.SetTextStr(const Value: string);
|
||||
var
|
||||
IsShowingEditor: Boolean;
|
||||
begin
|
||||
with FOwner do begin
|
||||
// Don't show editor while changing values. Edited cell would not be changed.
|
||||
IsShowingEditor := goAlwaysShowEditor in Options;
|
||||
Options := Options - [goAlwaysShowEditor];
|
||||
inherited SetTextStr(Value);
|
||||
if IsShowingEditor then
|
||||
Options := Options + [goAlwaysShowEditor];
|
||||
end;
|
||||
end;
|
||||
|
||||
constructor TValueListStrings.Create(AOwner: TValueListEditor);
|
||||
begin
|
||||
inherited Create;
|
||||
|
Loading…
Reference in New Issue
Block a user