unit NewTab;
uses ...;
procedure NeuerTab;
procedure VST_Edit_OnGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
var anzSQL:Integer = 0;
VST_Edit:
array of TVirtualStringTree;
Sheet :
array of TTabSheet;
procedure NeuerTab;
begin
SetLength(Sheet, anzSQL +1);
SetLength(VST_Edit, anzSQL +1);
Sheet[anzSQL]:=TTabSheet.Create(Form_Main.PageControl_NewTab);
Sheet[anzSQL].Parent:=Form_Main.PageControl_NewTab;
Sheet[anzSQL].PageControl:=Form_Main.PageControl_NewTab;
Sheet[anzSQL].Caption:='
Query '+ IntToStr(Form_Main.PageControl_NewTab.PageCount -1);
VST_Edit[anzSQL]:=TVirtualStringTree.Create(Sheet[anzSQL]);
VST_Edit[anzSQL].Parent:=Sheet[anzSQL];
with VST_Edit[anzSQL]
do
begin
Align:=alClient;
BorderStyle:=bsNone;
Header.Background:=clSkyBlue;
Header.Style:=hsFlatButtons;
Header.Options:=[hoColumnResize,hoDblClickResize,hoDrag,hoVisible];
TreeOptions.PaintOptions:=[toShowButtons, toShowDropmark, toShowHorzGridLines, toShowTreeLines, toShowVertGridLines, toThemeAware, toUseBlendedImages, toFullVertGridLines];
TreeOptions.SelectionOptions:=[toFullRowSelect];
Name:=NamePrefixVST + IntToStr(anzSQL);
OnGetText:=VST_Edit_OnGetText;
//GEHT NICHT
end;
inc(anzSQL);
end;