Skip to content

Commit

Permalink
Prevent various problems with alignment of controls. See http://www.h…
Browse files Browse the repository at this point in the history
  • Loading branch information
ansgarbecker committed Dec 3, 2015
1 parent d192d26 commit 636c220
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions source/main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -9741,6 +9741,7 @@ procedure TMainForm.actNewQueryTabExecute(Sender: TObject);
QueryTab.pnlMemo.Parent := QueryTab.TabSheet;
QueryTab.pnlMemo.BevelOuter := pnlQueryMemo.BevelOuter;
QueryTab.pnlMemo.Align := pnlQueryMemo.Align;
QueryTab.pnlMemo.Height := pnlQueryMemo.Height;

QueryTab.Memo := TSynMemo.Create(QueryTab.pnlMemo);
QueryTab.Memo.Parent := QueryTab.pnlMemo;
Expand Down Expand Up @@ -9772,6 +9773,7 @@ procedure TMainForm.actNewQueryTabExecute(Sender: TObject);
QueryTab.treeHelpers := TVirtualStringTree.Create(QueryTab.pnlMemo);
QueryTab.treeHelpers.Parent := QueryTab.pnlMemo;
QueryTab.treeHelpers.Align := treeQueryHelpers.Align;
QueryTab.treeHelpers.Width := treeQueryHelpers.Width;
QueryTab.treeHelpers.PopupMenu := treeQueryHelpers.PopupMenu;
QueryTab.treeHelpers.Images := treeQueryHelpers.Images;
QueryTab.treeHelpers.DragMode := treeQueryHelpers.DragMode;
Expand Down Expand Up @@ -9816,6 +9818,8 @@ procedure TMainForm.actNewQueryTabExecute(Sender: TObject);

QueryTab.tabsetQuery := TTabSet.Create(QueryTab.TabSheet);
QueryTab.tabsetQuery.Parent := QueryTab.TabSheet;
// Prevent various problems with alignment of controls. See http://www.heidisql.com/forum.php?t=18924
QueryTab.tabsetQuery.Top := QueryTab.spltQuery.Top + QueryTab.spltQuery.Height;
QueryTab.tabsetQuery.Align := tabsetQuery.Align;
InheritFont(QueryTab.tabsetQuery.Font);
QueryTab.tabsetQuery.Images := tabsetQuery.Images;
Expand All @@ -9834,15 +9838,6 @@ procedure TMainForm.actNewQueryTabExecute(Sender: TObject);

SetupSynEditors;

// Set splitter positions
// Use a reasonable default height for the query editor, to prevent a splitter problem
// See http://www.heidisql.com/forum.php?t=19952
QueryTab.pnlMemo.Height := 150;
QueryTab.pnlMemo.Top := pnlQueryMemo.Top;
QueryTab.tabsetQuery.Top := tabsetQuery.Top;
QueryTab.spltQuery.Top := spltQuery.Top;
QueryTab.treeHelpers.Width := treeQueryHelpers.Width;

// Show new tab
SetMainTab(QueryTab.TabSheet);
end;
Expand Down

0 comments on commit 636c220

Please sign in to comment.