mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-05 14:21:38 +02:00
improved layout of ide search results window
git-svn-id: trunk@9102 -
This commit is contained in:
parent
1598547c3c
commit
49f04efd16
@ -1,33 +1,42 @@
|
||||
object SearchResultsView: TSearchResultsView
|
||||
CAPTION = 'SearchResultsView'
|
||||
CLIENTHEIGHT = 229
|
||||
CLIENTWIDTH = 799
|
||||
ONCREATE = Form1Create
|
||||
ONDESTROY = SearchResultsViewDestroy
|
||||
HORZSCROLLBAR.PAGE = 800
|
||||
VERTSCROLLBAR.PAGE = 230
|
||||
LEFT = 151
|
||||
HEIGHT = 229
|
||||
TOP = 481
|
||||
WIDTH = 799
|
||||
object ResultsNoteBook: TNOTEBOOK
|
||||
ALIGN = albottom
|
||||
ANCHORS = [aktop, akleft]
|
||||
ONCLOSETABCLICKED = ResultsNoteBookClosetabclicked
|
||||
OPTIONS = [nboshowclosebuttons, nbomultiline]
|
||||
HEIGHT = 189
|
||||
TOP = 40
|
||||
WIDTH = 799
|
||||
ActiveControl = btnSearchAgain
|
||||
Caption = 'SearchResultsView'
|
||||
ClientHeight = 229
|
||||
ClientWidth = 799
|
||||
OnCreate = Form1Create
|
||||
OnDestroy = SearchResultsViewDestroy
|
||||
OnKeyDown = ListBoxKeyDown
|
||||
PixelsPerInch = 96
|
||||
Position = poScreenCenter
|
||||
HorzScrollBar.Page = 798
|
||||
VertScrollBar.Page = 228
|
||||
Left = 267
|
||||
Height = 229
|
||||
Top = 482
|
||||
Width = 799
|
||||
object ResultsNoteBook: TNotebook
|
||||
Align = alBottom
|
||||
Anchors = [akTop, akLeft]
|
||||
OnCloseTabClicked = ResultsNoteBookClosetabclicked
|
||||
Options = [nboShowCloseButtons, nboMultiLine]
|
||||
AnchorSideTop.Control = btnSearchAgain
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Height = 192
|
||||
Top = 37
|
||||
Width = 799
|
||||
end
|
||||
object btnSearchAgain: TBUTTON
|
||||
ANCHORS = [aktop, akleft]
|
||||
CAPTION = 'Search Again'
|
||||
TABSTOP = True
|
||||
TABORDER = 1
|
||||
ONCLICK = btnSearchAgainClick
|
||||
LEFT = 8
|
||||
HEIGHT = 25
|
||||
TOP = 8
|
||||
WIDTH = 115
|
||||
object btnSearchAgain: TButton
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.InnerBorder = 2
|
||||
Caption = 'Search Again'
|
||||
OnClick = btnSearchAgainClick
|
||||
OnKeyDown = ListBoxKeyDown
|
||||
TabOrder = 1
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 6
|
||||
Height = 25
|
||||
Top = 6
|
||||
Width = 115
|
||||
end
|
||||
end
|
||||
|
@ -1,15 +1,20 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TSearchResultsView','FORMDATA',[
|
||||
'TPF0'#18'TSearchResultsView'#17'SearchResultsView'#7'CAPTION'#6#17'SearchRes'
|
||||
+'ultsView'#12'CLIENTHEIGHT'#3#229#0#11'CLIENTWIDTH'#3#31#3#8'ONCREATE'#7#11
|
||||
+'Form1Create'#9'ONDESTROY'#7#24'SearchResultsViewDestroy'#18'HORZSCROLLBAR.P'
|
||||
+'AGE'#3' '#3#18'VERTSCROLLBAR.PAGE'#3#230#0#4'LEFT'#3#151#0#6'HEIGHT'#3#229#0
|
||||
+#3'TOP'#3#225#1#5'WIDTH'#3#31#3#0#9'TNOTEBOOK'#15'ResultsNoteBook'#5'ALIGN'#7
|
||||
+#8'albottom'#7'ANCHORS'#11#5'aktop'#6'akleft'#0#17'ONCLOSETABCLICKED'#7#30'R'
|
||||
+'esultsNoteBookClosetabclicked'#7'OPTIONS'#11#19'nboshowclosebuttons'#12'nbo'
|
||||
+'multiline'#0#6'HEIGHT'#3#189#0#3'TOP'#2'('#5'WIDTH'#3#31#3#0#0#7'TBUTTON'#14
|
||||
+'btnSearchAgain'#7'ANCHORS'#11#5'aktop'#6'akleft'#0#7'CAPTION'#6#12'Search A'
|
||||
+'gain'#7'TABSTOP'#9#8'TABORDER'#2#1#7'ONCLICK'#7#19'btnSearchAgainClick'#4'L'
|
||||
+'EFT'#2#8#6'HEIGHT'#2#25#3'TOP'#2#8#5'WIDTH'#2's'#0#0#0
|
||||
'TPF0'#18'TSearchResultsView'#17'SearchResultsView'#13'ActiveControl'#7#14'bt'
|
||||
+'nSearchAgain'#7'Caption'#6#17'SearchResultsView'#12'ClientHeight'#3#229#0#11
|
||||
+'ClientWidth'#3#31#3#8'OnCreate'#7#11'Form1Create'#9'OnDestroy'#7#24'SearchR'
|
||||
+'esultsViewDestroy'#9'OnKeyDown'#7#14'ListBoxKeyDown'#13'PixelsPerInch'#2'`'
|
||||
+#8'Position'#7#14'poScreenCenter'#18'HorzScrollBar.Page'#3#30#3#18'VertScrol'
|
||||
+'lBar.Page'#3#228#0#4'Left'#3#11#1#6'Height'#3#229#0#3'Top'#3#226#1#5'Width'
|
||||
+#3#31#3#0#9'TNotebook'#15'ResultsNoteBook'#5'Align'#7#8'alBottom'#7'Anchors'
|
||||
+#11#5'akTop'#6'akLeft'#0#17'OnCloseTabClicked'#7#30'ResultsNoteBookClosetabc'
|
||||
+'licked'#7'Options'#11#19'nboShowCloseButtons'#12'nboMultiLine'#0#21'AnchorS'
|
||||
+'ideTop.Control'#7#14'btnSearchAgain'#18'AnchorSideTop.Side'#7#9'asrBottom'#6
|
||||
+'Height'#3#192#0#3'Top'#2'%'#5'Width'#3#31#3#0#0#7'TButton'#14'btnSearchAgai'
|
||||
+'n'#20'BorderSpacing.Around'#2#6#25'BorderSpacing.InnerBorder'#2#2#7'Caption'
|
||||
+#6#12'Search Again'#7'OnClick'#7#19'btnSearchAgainClick'#9'OnKeyDown'#7#14'L'
|
||||
+'istBoxKeyDown'#8'TabOrder'#2#1#22'AnchorSideLeft.Control'#7#5'Owner'#21'Anc'
|
||||
+'horSideTop.Control'#7#5'Owner'#4'Left'#2#6#6'Height'#2#25#3'Top'#2#6#5'Widt'
|
||||
+'h'#2's'#0#0#0
|
||||
]);
|
||||
|
@ -105,9 +105,10 @@ type
|
||||
{ TSearchResultsView }
|
||||
|
||||
TSearchResultsView = class(TForm)
|
||||
btnSearchAgain: TBUTTON;
|
||||
ResultsNoteBook: TNOTEBOOK;
|
||||
btnSearchAgain: TButton;
|
||||
ResultsNoteBook: TNotebook;
|
||||
procedure Form1Create(Sender: TObject);
|
||||
procedure ListBoxKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
procedure ResultsNoteBookChangebounds(Sender: TObject);
|
||||
procedure ResultsNoteBookClosetabclicked(Sender: TObject);
|
||||
procedure SearchResultsViewDestroy(Sender: TObject);
|
||||
@ -127,9 +128,9 @@ type
|
||||
procedure ListBoxDoubleClicked(Sender: TObject);
|
||||
procedure SetItems(Index: Integer; Value: TStrings);
|
||||
function GetItems(Index: integer): TStrings;
|
||||
fOnSelectionChanged: TNotifyEvent;
|
||||
fListBoxFont: TFont;
|
||||
fMouseOverIndex: integer;
|
||||
fOnSelectionChanged: TNotifyEvent;
|
||||
fListBoxFont: TFont;
|
||||
fMouseOverIndex: integer;
|
||||
public
|
||||
function AddResult(const ResultsName: string;
|
||||
const SearchText: string;
|
||||
@ -378,6 +379,13 @@ begin
|
||||
end;//for
|
||||
end;//PageExists
|
||||
|
||||
procedure TSearchResultsView.ListBoxKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
begin
|
||||
if Key = 27 then
|
||||
Close;
|
||||
end;
|
||||
|
||||
{Add Result will create a tab in the Results view window with an new
|
||||
list box or focus an existing listbox and update it's searchoptions.}
|
||||
function TSearchResultsView.AddResult(const ResultsName: string;
|
||||
@ -405,6 +413,7 @@ begin
|
||||
begin
|
||||
NewPage:= Pages.Add(ResultsName + SPACE);
|
||||
ResultsNoteBook.PageIndex:= NewPage;
|
||||
ResultsNoteBook.Page[ResultsNoteBook.PageIndex].OnKeyDown := @ListBoxKeyDown;
|
||||
if NewPage > -1 then
|
||||
begin
|
||||
NewListBox:= TLazSearchResultLB.Create(Page[NewPage]);
|
||||
@ -412,9 +421,11 @@ begin
|
||||
begin
|
||||
Parent:= Page[NewPage];
|
||||
Align:= alClient;
|
||||
BorderSpacing.Around := 6;
|
||||
ClickOnSelChange:=false;
|
||||
OnClick:= @ListBoxClicked;
|
||||
OnDblClick:= @ListBoxDoubleClicked;
|
||||
OnKeyDown := @ListBoxKeyDown;
|
||||
Style:= lbOwnerDrawFixed;
|
||||
OnDrawItem:= @ListBoxDrawItem;
|
||||
OnShowHint:= @LazLBShowHint;
|
||||
|
Loading…
Reference in New Issue
Block a user