IDE: In SearchResultsView replace PageControl with ExtendedNotebook which allows reordering tabs. Rename SearchAgainButton -> NewSearchButton.

git-svn-id: trunk@64038 -
This commit is contained in:
juha 2020-10-17 16:19:15 +00:00
parent 006d6e0dcf
commit 1945f8b61d
4 changed files with 35 additions and 31 deletions

View File

@ -5614,8 +5614,7 @@ var
CurGrid: TOICustomPropertyGrid;
begin
// ToDo: Allow TAB key to FilterEdit, TreeView and Grid. Now the Grid gets seleted always.
DebugLn(['TObjectInspectorDlg.KeyDown: Key=', Key, ', ActiveControl=', ActiveControl]);
//DebugLn(['TObjectInspectorDlg.KeyDown: Key=', Key, ', ActiveControl=', ActiveControl]);
//Do not disturb the combobox navigation while it has focus
if not AvailPersistentComboBox.DroppedDown then begin
CurGrid:=GetActivePropertyGrid;

View File

@ -1263,7 +1263,9 @@
<Unit210>
<Filename Value="searchresultview.pp"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="SearchResultsView"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="SearchResultView"/>
</Unit210>
<Unit211>

View File

@ -13,20 +13,7 @@ object SearchResultsView: TSearchResultsView
OnClose = FormClose
OnCreate = Form1Create
OnKeyDown = FormKeyDown
object ResultsNoteBook: TPageControl
Left = 0
Height = 249
Top = 26
Width = 722
Align = alClient
MultiLine = True
TabOrder = 0
OnChange = ResultsNoteBookPageChanged
OnCloseTabClicked = ResultsNoteBookClosetabclicked
OnMouseDown = ResultsNoteBookMouseDown
OnResize = ResultsNoteBookResize
Options = [nboShowCloseButtons, nboMultiLine, nboDoChangeOnSetIndex]
end
LCLVersion = '2.1.0.0'
object ControlBar1: TPanel
Left = 0
Height = 26
@ -49,13 +36,13 @@ object SearchResultsView: TSearchResultsView
EdgeInner = esNone
EdgeOuter = esNone
TabOrder = 0
object SearchAgainButton: TToolButton
object NewSearchButton: TToolButton
Left = 1
Top = 0
AutoSize = True
Caption = 'SearchAgainButton'
Caption = 'NewSearchButton'
ImageIndex = 0
OnClick = SearchAgainButtonClick
OnClick = NewSearchButtonClick
end
object ClosePageButton: TToolButton
Left = 24
@ -123,9 +110,25 @@ object SearchResultsView: TSearchResultsView
end
end
end
object ResultsNoteBook: TExtendedNotebook
Left = 0
Height = 249
Top = 26
Width = 722
Align = alClient
MultiLine = True
TabOrder = 0
OnChange = ResultsNoteBookPageChanged
OnCloseTabClicked = ResultsNoteBookClosetabclicked
OnMouseDown = ResultsNoteBookMouseDown
OnResize = ResultsNoteBookResize
Options = [nboShowCloseButtons, nboMultiLine, nboDoChangeOnSetIndex]
TabDragMode = dmAutomatic
TabDragAcceptMode = dmAutomatic
end
object popList: TPopupMenu
left = 129
top = 48
Left = 129
Top = 48
object mniCopyItem: TMenuItem
Caption = 'Copy Item'
OnClick = mniCopyItemClick
@ -151,8 +154,8 @@ object SearchResultsView: TSearchResultsView
end
end
object ActionList: TActionList
left = 32
top = 48
Left = 32
Top = 48
object actClosePage: TAction
ImageIndex = 1
OnExecute = ClosePageButtonClick

View File

@ -42,7 +42,7 @@ uses
LCLProc, LCLType, LCLIntf, Forms, Controls, Graphics, ComCtrls, Menus, Clipbrd,
ActnList, ExtCtrls,
// LazControls
TreeFilterEdit,
TreeFilterEdit, ExtendedNotebook,
// LazUtils
LazUTF8, LazFileUtils, LazLoggerBase, LazStringUtils,
// IdeIntf
@ -151,12 +151,12 @@ type
mniCopyItem: TMenuItem;
pnlToolBars: TPanel;
popList: TPopupMenu;
ResultsNoteBook: TPageControl;
ResultsNoteBook: TExtendedNotebook;
tbbCloseLeft: TToolButton;
tbbCloseOthers: TToolButton;
tbbCloseRight: TToolButton;
ToolBar: TToolBar;
SearchAgainButton: TToolButton;
NewSearchButton: TToolButton;
CloseTabs: TToolBar;
ClosePageButton: TToolButton;
SearchInListEdit: TTreeFilterEdit;
@ -183,7 +183,7 @@ type
{%H-}Shift: TShiftState; X, Y: Integer);
procedure TreeViewKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure ResultsNoteBookClosetabclicked(Sender: TObject);
procedure SearchAgainButtonClick(Sender: TObject);
procedure NewSearchButtonClick(Sender: TObject);
procedure TreeViewAdvancedCustomDrawItem(Sender: TCustomTreeView;
Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStage;
var {%H-}PaintImages, {%H-}DefaultDraw: Boolean);
@ -322,7 +322,7 @@ begin
Name:=NonModalIDEWindowNames[nmiwSearchResultsView];
Caption:=lisMenuViewSearchResults;
SearchAgainButton.Hint:=rsStartANewSearch;
NewSearchButton.Hint:=rsStartANewSearch;
ClosePageButton.Hint := rsCloseCurrentPage;
SearchInListEdit.Hint:=rsFilterTheListWithString;
{ Close tabs buttons }
@ -351,7 +351,7 @@ begin
mniCollapseAll.Caption := lisCollapseAll;
ToolBar.Images := IDEImages.Images_16;
SearchAgainButton.ImageIndex := IDEImages.LoadImage('menu_new_search');
NewSearchButton.ImageIndex := IDEImages.LoadImage('menu_new_search');
ClosePageButton.ImageIndex := IDEImages.LoadImage('menu_close');
ActionList.Images := IDEImages.Images_16;
actClosePage.ImageIndex := IDEImages.LoadImage('menu_close');
@ -844,7 +844,7 @@ var
begin
CurrentTV:= GetTreeView(ResultsNoteBook.PageIndex);
state := Assigned(CurrentTV) and not CurrentTV.Updating;
SearchAgainButton.Enabled := state;
NewSearchButton.Enabled := state;
ClosePageButton.Enabled := state;
SearchInListEdit.Enabled := state;
if state then
@ -938,7 +938,7 @@ begin
ClosePage(TTabSheet(Sender).PageIndex)
end;
procedure TSearchResultsView.SearchAgainButtonClick(Sender: TObject);
procedure TSearchResultsView.NewSearchButtonClick(Sender: TObject);
var
CurrentTV: TLazSearchResultTV;
SearchObj: TLazSearch;