mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Refactor grid editors unit: Implement a base class with all stuff which was implemented redundant previously and let all other editors descend from this class. Saves ~300 lines of code and makes implementing new editors easier.
Additionally this implements tabbing through edited fields for all grid editors. And it fixes issue #1266, issue #1267, issue #1253, issue #1178, issue #1155, issue #825 and issue #566 .
This commit is contained in:
@ -327,20 +327,22 @@ end;
|
||||
procedure TfrmRoutineEditor.listParametersCreateEditor(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode; Column: TColumnIndex; out EditLink: IVTEditLink);
|
||||
var
|
||||
VT: TVirtualStringTree;
|
||||
EnumEditor: TEnumEditorLink;
|
||||
i: Integer;
|
||||
begin
|
||||
VT := Sender as TVirtualStringTree;
|
||||
if Column = 1 then
|
||||
EditLink := TStringEditLink.Create
|
||||
else if Column = 2 then begin
|
||||
EnumEditor := TEnumEditorLink.Create;
|
||||
EnumEditor := TEnumEditorLink.Create(VT);
|
||||
EnumEditor.AllowCustomText := True;
|
||||
EnumEditor.ValueList := TWideStringList.Create;
|
||||
for i:=Low(Datatypes) to High(Datatypes) do
|
||||
EnumEditor.ValueList.Add(Datatypes[i].Name);
|
||||
EditLink := EnumEditor;
|
||||
end else if Column = 3 then begin
|
||||
EnumEditor := TEnumEditorLink.Create;
|
||||
EnumEditor := TEnumEditorLink.Create(VT);
|
||||
EnumEditor.ValueList := TWideStringList.Create;
|
||||
EnumEditor.ValueList.Add('IN');
|
||||
EnumEditor.ValueList.Add('OUT');
|
||||
|
Reference in New Issue
Block a user