diff --git a/source/main.lfm b/source/main.lfm index 8d582bb2..3a262dfc 100644 --- a/source/main.lfm +++ b/source/main.lfm @@ -4340,6 +4340,7 @@ object MainForm: TMainForm Caption = '&Previous tab' Hint = 'Previous tab|Go back to the previous tab' ImageIndex = 117 + OnExecute = actPreviousTabExecute ShortCut = 24585 end object actNextTab: TAction @@ -4347,6 +4348,7 @@ object MainForm: TMainForm Caption = '&Next tab' Hint = 'Next tab|Go to the next tab' ImageIndex = 116 + OnExecute = actNextTabExecute ShortCut = 16393 end object actSelectAll: TAction @@ -20038,7 +20040,7 @@ object MainForm: TMainForm end object SynCompletionProposal: TSynCompletion OnExecute = SynCompletionProposalExecute - Position = 0 + Position = -1 LinesInWindow = 6 OnPositionChanged = SynCompletionProposalChange SelectedColor = clHighlight diff --git a/source/main.pas b/source/main.pas index 2affa0e6..b673bf30 100644 --- a/source/main.pas +++ b/source/main.pas @@ -786,6 +786,8 @@ type actCopyGridNodes: TAction; actCopyGridNodes1: TMenuItem; procedure actCreateDBObjectExecute(Sender: TObject); + procedure actNextTabExecute(Sender: TObject); + procedure actPreviousTabExecute(Sender: TObject); procedure menuConnectionsPopup(Sender: TObject); procedure actExitApplicationExecute(Sender: TObject); //procedure WMCopyData(var Msg: TWMCopyData); message WM_COPYDATA; @@ -4516,6 +4518,16 @@ begin PlaceObjectEditor(Obj); end; +procedure TMainForm.actNextTabExecute(Sender: TObject); +begin + PageControlMain.SelectNextPage(True); +end; + +procedure TMainForm.actPreviousTabExecute(Sender: TObject); +begin + PageControlMain.SelectNextPage(False); +end; + procedure TMainForm.actEmptyTablesExecute(Sender: TObject); var @@ -14891,8 +14903,10 @@ begin // Go back to the result tab left to the active one Tab := QueryTabs.ActiveTab; if Tab <> nil then begin - if Tab.tabsetQuery.TabIndex > 0 then - //Tab.tabsetQuery.SelectNext(False) + if Tab.tabsetQuery.TabIndex > 0 then begin + Tab.tabsetQuery.TabIndex := Tab.tabsetQuery.TabIndex -1; + Tab.tabsetQuery.OnChange(Tab.tabsetQuery); + end else Beep; end; @@ -14906,8 +14920,10 @@ begin // Advance to the next result tab Tab := QueryTabs.ActiveTab; if Tab <> nil then begin - if Tab.tabsetQuery.TabIndex < Tab.tabsetQuery.Tabs.Count-1 then - //Tab.tabsetQuery.SelectNext(True) + if Tab.tabsetQuery.TabIndex < Tab.tabsetQuery.Tabs.Count-1 then begin + Tab.tabsetQuery.TabIndex := Tab.tabsetQuery.TabIndex +1; + Tab.tabsetQuery.OnChange(Tab.tabsetQuery); + end else Beep; end;