mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-23 09:59:38 +02:00
Win positioned, Beginner listed first, keypress triggers sort, Enter same as dbl click
This commit is contained in:
parent
5efb577ae9
commit
1dbfe9f875
@ -46,6 +46,7 @@ resourcestring
|
|||||||
rsExampleKeyWords = 'Keywords'; // "
|
rsExampleKeyWords = 'Keywords'; // "
|
||||||
rsExSearchingForExamples = 'Searching for Examples ...';
|
rsExSearchingForExamples = 'Searching for Examples ...';
|
||||||
rsFailedToCopyFilesTo = 'Failed to copy files to'; // Followed by a dir were we, apparently, cannot write
|
rsFailedToCopyFilesTo = 'Failed to copy files to'; // Followed by a dir were we, apparently, cannot write
|
||||||
|
rsGroupHint = 'Double click to invert';
|
||||||
|
|
||||||
// These are ObjectInspector set but I believe I cannot get OI literals i18n in a Package ??
|
// These are ObjectInspector set but I believe I cannot get OI literals i18n in a Package ??
|
||||||
rsExampleOpen = 'Open'; // Button Caption
|
rsExampleOpen = 'Open'; // Button Caption
|
||||||
|
@ -196,8 +196,7 @@ uses LCLProc,
|
|||||||
lazfileutils, fileutil,
|
lazfileutils, fileutil,
|
||||||
jsonscanner, // these are the FPC JSON tools
|
jsonscanner, // these are the FPC JSON tools
|
||||||
base64,
|
base64,
|
||||||
laz2_DOM, laz2_XMLRead // just to get LazarusDirectory, remove if we find a better way !
|
laz2_DOM, laz2_XMLRead; // just to get LazarusDirectory, remove if we find a better way !
|
||||||
{, IDEOptionsIntf} ;
|
|
||||||
|
|
||||||
const
|
const
|
||||||
LastUpDate = 'LastUpDate'; // Name of JSON item were we store last update date
|
LastUpDate = 'LastUpDate'; // Name of JSON item were we store last update date
|
||||||
@ -304,6 +303,11 @@ end;
|
|||||||
// T E X A M P L E D A T A
|
// T E X A M P L E D A T A
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
|
|
||||||
|
// Address of this function is passed to a list sort call. We sort on category, Beginners at top
|
||||||
|
function CategorySorter( Item1: Pointer; Item2: Pointer) : Integer;
|
||||||
|
begin
|
||||||
|
result := CompareStr(PExRec(Item1)^.Category, PExRec(Item2)^.Category);
|
||||||
|
end;
|
||||||
|
|
||||||
function TExampleData.Count: integer;
|
function TExampleData.Count: integer;
|
||||||
begin
|
begin
|
||||||
@ -541,6 +545,7 @@ begin
|
|||||||
ScanLocalTree(ExamplesHome, True); // Get, eg, any OPM Examples
|
ScanLocalTree(ExamplesHome, True); // Get, eg, any OPM Examples
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
ExList.Sort(@CategorySorter);
|
||||||
// if ExList.Count = 0 then begin
|
// if ExList.Count = 0 then begin
|
||||||
// debugln('TExampleData.LoadExData - found examples = ' + inttostr(ExList.Count));
|
// debugln('TExampleData.LoadExData - found examples = ' + inttostr(ExList.Count));
|
||||||
// debugln('Lazarus Dir (ie source tree) = ' + GetLazDir());
|
// debugln('Lazarus Dir (ie source tree) = ' + GetLazDir());
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
object FormLazExam: TFormLazExam
|
object FormLazExam: TFormLazExam
|
||||||
Left = 55
|
Left = 88
|
||||||
Height = 500
|
Height = 400
|
||||||
Top = 143
|
Top = 155
|
||||||
Width = 976
|
Width = 781
|
||||||
Caption = 'Prototype Lazarus Examples Window'
|
Caption = 'Prototype Lazarus Examples Window'
|
||||||
ClientHeight = 500
|
ClientHeight = 400
|
||||||
ClientWidth = 976
|
ClientWidth = 781
|
||||||
DesignTimePPI = 120
|
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnDestroy = FormDestroy
|
OnDestroy = FormDestroy
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
|
LCLVersion = '2.3.0.0'
|
||||||
object Memo1: TMemo
|
object Memo1: TMemo
|
||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideTop.Control = Splitter2
|
AnchorSideTop.Control = Splitter2
|
||||||
@ -17,14 +17,14 @@ object FormLazExam: TFormLazExam
|
|||||||
AnchorSideRight.Control = Owner
|
AnchorSideRight.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = CheckGroupCategory
|
AnchorSideBottom.Control = CheckGroupCategory
|
||||||
Left = 6
|
Left = 5
|
||||||
Height = 202
|
Height = 151
|
||||||
Top = 197
|
Top = 157
|
||||||
Width = 964
|
Width = 771
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 5
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 5
|
||||||
BorderSpacing.Bottom = 6
|
BorderSpacing.Bottom = 5
|
||||||
Lines.Strings = (
|
Lines.Strings = (
|
||||||
'Memo1'
|
'Memo1'
|
||||||
)
|
)
|
||||||
@ -32,6 +32,7 @@ object FormLazExam: TFormLazExam
|
|||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
ScrollBars = ssAutoVertical
|
ScrollBars = ssAutoVertical
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
TabStop = False
|
||||||
end
|
end
|
||||||
object ListView1: TListView
|
object ListView1: TListView
|
||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
@ -39,22 +40,22 @@ object FormLazExam: TFormLazExam
|
|||||||
AnchorSideRight.Control = Owner
|
AnchorSideRight.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = Splitter2
|
AnchorSideBottom.Control = Splitter2
|
||||||
Left = 6
|
Left = 5
|
||||||
Height = 139
|
Height = 110
|
||||||
Hint = 'Click for Info, Double Click to download'
|
Hint = 'Click for Info, Double Click to download'
|
||||||
Top = 46
|
Top = 37
|
||||||
Width = 964
|
Width = 771
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 5
|
||||||
Columns = <
|
Columns = <
|
||||||
item
|
item
|
||||||
Width = 10
|
Width = 8
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Width = 10
|
Width = 8
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Width = 10
|
Width = 740
|
||||||
end>
|
end>
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
@ -62,6 +63,7 @@ object FormLazExam: TFormLazExam
|
|||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnClick = ListView1Click
|
OnClick = ListView1Click
|
||||||
OnDblClick = ListView1DblClick
|
OnDblClick = ListView1DblClick
|
||||||
|
OnKeyDown = ListView1KeyDown
|
||||||
OnSelectItem = ListView1SelectItem
|
OnSelectItem = ListView1SelectItem
|
||||||
end
|
end
|
||||||
object CheckGroupCategory: TCheckGroup
|
object CheckGroupCategory: TCheckGroup
|
||||||
@ -69,16 +71,16 @@ object FormLazExam: TFormLazExam
|
|||||||
AnchorSideRight.Control = Owner
|
AnchorSideRight.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = ButtonOpen
|
AnchorSideBottom.Control = ButtonOpen
|
||||||
Left = 6
|
Left = 5
|
||||||
Height = 24
|
Height = 23
|
||||||
Top = 405
|
Top = 313
|
||||||
Width = 964
|
Width = 771
|
||||||
Anchors = [akLeft, akRight, akBottom]
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
AutoFill = True
|
AutoFill = True
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 5
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 5
|
||||||
BorderSpacing.Bottom = 6
|
BorderSpacing.Bottom = 5
|
||||||
Caption = 'Category'
|
Caption = 'Category'
|
||||||
ChildSizing.LeftRightSpacing = 6
|
ChildSizing.LeftRightSpacing = 6
|
||||||
ChildSizing.TopBottomSpacing = 6
|
ChildSizing.TopBottomSpacing = 6
|
||||||
@ -91,6 +93,8 @@ object FormLazExam: TFormLazExam
|
|||||||
Columns = 2
|
Columns = 2
|
||||||
OnDblClick = CheckGroupCategoryDblClick
|
OnDblClick = CheckGroupCategoryDblClick
|
||||||
OnItemClick = CheckGroupCategoryItemClick
|
OnItemClick = CheckGroupCategoryItemClick
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object Splitter2: TSplitter
|
object Splitter2: TSplitter
|
||||||
@ -101,18 +105,18 @@ object FormLazExam: TFormLazExam
|
|||||||
AnchorSideBottom.Control = Memo1
|
AnchorSideBottom.Control = Memo1
|
||||||
Cursor = crVSplit
|
Cursor = crVSplit
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 6
|
Height = 5
|
||||||
Top = 191
|
Top = 152
|
||||||
Width = 976
|
Width = 781
|
||||||
Align = alNone
|
Align = alNone
|
||||||
Anchors = [akLeft, akRight]
|
Anchors = [akLeft, akRight]
|
||||||
ResizeAnchor = akTop
|
ResizeAnchor = akTop
|
||||||
end
|
end
|
||||||
object StatusBar1: TStatusBar
|
object StatusBar1: TStatusBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 29
|
Height = 23
|
||||||
Top = 471
|
Top = 377
|
||||||
Width = 976
|
Width = 781
|
||||||
Panels = <>
|
Panels = <>
|
||||||
end
|
end
|
||||||
object ButtonDownload: TButton
|
object ButtonDownload: TButton
|
||||||
@ -121,13 +125,13 @@ object FormLazExam: TFormLazExam
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = ButtonOpen
|
AnchorSideBottom.Control = ButtonOpen
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 74
|
Left = 64
|
||||||
Height = 30
|
Height = 31
|
||||||
Top = 435
|
Top = 341
|
||||||
Width = 95
|
Width = 89
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 5
|
||||||
Caption = 'Download'
|
Caption = 'Download'
|
||||||
OnClick = ButtonDownloadClick
|
OnClick = ButtonDownloadClick
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
@ -138,13 +142,13 @@ object FormLazExam: TFormLazExam
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = ButtonOpen
|
AnchorSideBottom.Control = ButtonOpen
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 283
|
Left = 266
|
||||||
Height = 30
|
Height = 31
|
||||||
Top = 435
|
Top = 341
|
||||||
Width = 62
|
Width = 54
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 5
|
||||||
Caption = 'Close'
|
Caption = 'Close'
|
||||||
OnClick = ButtonCloseClick
|
OnClick = ButtonCloseClick
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
@ -153,14 +157,14 @@ object FormLazExam: TFormLazExam
|
|||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = StatusBar1
|
AnchorSideBottom.Control = StatusBar1
|
||||||
Left = 6
|
Left = 5
|
||||||
Height = 30
|
Height = 31
|
||||||
Top = 435
|
Top = 341
|
||||||
Width = 62
|
Width = 54
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 5
|
||||||
BorderSpacing.Bottom = 6
|
BorderSpacing.Bottom = 5
|
||||||
Caption = 'Open'
|
Caption = 'Open'
|
||||||
OnClick = ButtonOpenClick
|
OnClick = ButtonOpenClick
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
@ -171,13 +175,13 @@ object FormLazExam: TFormLazExam
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = ButtonOpen
|
AnchorSideBottom.Control = ButtonOpen
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 175
|
Left = 158
|
||||||
Height = 30
|
Height = 31
|
||||||
Top = 435
|
Top = 341
|
||||||
Width = 102
|
Width = 103
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 5
|
||||||
Caption = 'ButtonView'
|
Caption = 'ButtonView'
|
||||||
OnClick = ButtonViewClick
|
OnClick = ButtonViewClick
|
||||||
TabOrder = 8
|
TabOrder = 8
|
||||||
@ -187,15 +191,16 @@ object FormLazExam: TFormLazExam
|
|||||||
AnchorSideTop.Control = Owner
|
AnchorSideTop.Control = Owner
|
||||||
AnchorSideRight.Control = Owner
|
AnchorSideRight.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 6
|
Left = 5
|
||||||
Height = 28
|
Height = 29
|
||||||
Hint = 'Searches for Keywords'
|
Hint = 'Searches for Keywords'
|
||||||
Top = 6
|
Top = 5
|
||||||
Width = 964
|
Width = 771
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 5
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 5
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 5
|
||||||
|
OnChange = EditSearchChange
|
||||||
OnExit = EditSearchExit
|
OnExit = EditSearchExit
|
||||||
OnKeyUp = EditSearchKeyUp
|
OnKeyUp = EditSearchKeyUp
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
|
@ -25,7 +25,6 @@ Notes -
|
|||||||
David Bannon, Feb 2022
|
David Bannon, Feb 2022
|
||||||
}
|
}
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
{x$define EXTESTMODE}
|
|
||||||
|
|
||||||
{X$define ONLINE_EXAMPLES}
|
{X$define ONLINE_EXAMPLES}
|
||||||
|
|
||||||
@ -53,6 +52,7 @@ type
|
|||||||
EditSearch: TEdit;
|
EditSearch: TEdit;
|
||||||
ListView1: TListView;
|
ListView1: TListView;
|
||||||
Memo1: TMemo;
|
Memo1: TMemo;
|
||||||
|
Panel1: TPanel;
|
||||||
Splitter2: TSplitter;
|
Splitter2: TSplitter;
|
||||||
StatusBar1: TStatusBar;
|
StatusBar1: TStatusBar;
|
||||||
procedure ButtonCloseClick(Sender: TObject);
|
procedure ButtonCloseClick(Sender: TObject);
|
||||||
@ -61,6 +61,7 @@ type
|
|||||||
procedure ButtonViewClick(Sender: TObject);
|
procedure ButtonViewClick(Sender: TObject);
|
||||||
procedure CheckGroupCategoryDblClick(Sender: TObject);
|
procedure CheckGroupCategoryDblClick(Sender: TObject);
|
||||||
procedure CheckGroupCategoryItemClick(Sender: TObject; Index: integer);
|
procedure CheckGroupCategoryItemClick(Sender: TObject; Index: integer);
|
||||||
|
procedure EditSearchChange(Sender: TObject);
|
||||||
procedure EditSearchExit(Sender: TObject);
|
procedure EditSearchExit(Sender: TObject);
|
||||||
procedure EditSearchKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure EditSearchKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
@ -68,6 +69,8 @@ type
|
|||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure ListView1Click(Sender: TObject);
|
procedure ListView1Click(Sender: TObject);
|
||||||
procedure ListView1DblClick(Sender: TObject);
|
procedure ListView1DblClick(Sender: TObject);
|
||||||
|
procedure ListView1KeyDown(Sender: TObject; var Key: Word;
|
||||||
|
Shift: TShiftState);
|
||||||
procedure ListView1SelectItem(Sender: TObject; Item: TListItem; Selected: Boolean);
|
procedure ListView1SelectItem(Sender: TObject; Item: TListItem; Selected: Boolean);
|
||||||
private
|
private
|
||||||
procedure BuildSearchList(SL: TStringList; const Term: AnsiString);
|
procedure BuildSearchList(SL: TStringList; const Term: AnsiString);
|
||||||
@ -182,6 +185,15 @@ begin
|
|||||||
ButtonOpenClick(self);
|
ButtonOpenClick(self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFormLazExam.ListView1KeyDown(Sender: TObject; var Key: Word;
|
||||||
|
Shift: TShiftState);
|
||||||
|
begin
|
||||||
|
if Key = vk_return then begin
|
||||||
|
Key := 0;
|
||||||
|
ListView1DblClick(Sender);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
// --------------------- B U T T O N S -----------------------------------------
|
// --------------------- B U T T O N S -----------------------------------------
|
||||||
|
|
||||||
procedure TFormLazExam.ButtonOpenClick(Sender: TObject);
|
procedure TFormLazExam.ButtonOpenClick(Sender: TObject);
|
||||||
@ -267,6 +279,7 @@ var
|
|||||||
begin
|
begin
|
||||||
for i := 0 to CheckGroupCategory.Items.Count -1 do
|
for i := 0 to CheckGroupCategory.Items.Count -1 do
|
||||||
CheckGroupCategory.Checked[i] := not CheckGroupCategory.Checked[i];
|
CheckGroupCategory.Checked[i] := not CheckGroupCategory.Checked[i];
|
||||||
|
CheckGroupCategoryItemClick(Sender, 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormLazExam.CheckGroupCategoryItemClick(Sender: TObject; Index: integer);
|
procedure TFormLazExam.CheckGroupCategoryItemClick(Sender: TObject; Index: integer);
|
||||||
@ -278,6 +291,7 @@ begin
|
|||||||
LoadUpListView();
|
LoadUpListView();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
// ---------------------- Setting Project to Open ------------------------------
|
// ---------------------- Setting Project to Open ------------------------------
|
||||||
|
|
||||||
function TFormLazExam.GetProjectFile(const APath : string; WriteProjectToOpen : boolean = false) : boolean;
|
function TFormLazExam.GetProjectFile(const APath : string; WriteProjectToOpen : boolean = false) : boolean;
|
||||||
@ -378,6 +392,12 @@ begin
|
|||||||
LoadUpListView();
|
LoadUpListView();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFormLazExam.EditSearchChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if (EditSearch.Text <> '') and (EditSearch.Text <> rsExSearchPrompt) then
|
||||||
|
KeyWordSearch();
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TFormLazExam.EditSearchKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure TFormLazExam.EditSearchKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
begin
|
begin
|
||||||
// Must do this here to stop LCL from selecting the text on VK_RETURN
|
// Must do this here to stop LCL from selecting the text on VK_RETURN
|
||||||
@ -419,6 +439,7 @@ begin
|
|||||||
ListView1.Column[2].Visible := false;
|
ListView1.Column[2].Visible := false;
|
||||||
ListView1.ReadOnly := True;
|
ListView1.ReadOnly := True;
|
||||||
EditSearch.text := rsExSearchPrompt;
|
EditSearch.text := rsExSearchPrompt;
|
||||||
|
CheckGroupCategory.Hint := rsGroupHint;
|
||||||
Ex := nil;
|
Ex := nil;
|
||||||
// These are ObjectInspector set but I believe I cannot get OI literals set in a Package ??
|
// These are ObjectInspector set but I believe I cannot get OI literals set in a Package ??
|
||||||
ButtonClose.Caption := rsExampleClose;
|
ButtonClose.Caption := rsExampleClose;
|
||||||
@ -445,6 +466,9 @@ var
|
|||||||
i : integer;
|
i : integer;
|
||||||
begin
|
begin
|
||||||
Memo1.clear;
|
Memo1.clear;
|
||||||
|
Top := Screen.Height div 10;
|
||||||
|
Height := Screen.Height * 7 div 10;
|
||||||
|
ListView1.Height:= Screen.Height * 3 div 10;
|
||||||
if Ex <> Nil then Ex.Free;
|
if Ex <> Nil then Ex.Free;
|
||||||
StatusBar1.SimpleText := rsExSearchingForExamples;
|
StatusBar1.SimpleText := rsExSearchingForExamples;
|
||||||
Ex := TExampleData.Create();
|
Ex := TExampleData.Create();
|
||||||
@ -470,8 +494,6 @@ begin
|
|||||||
if EditSearch.Text <> rsExSearchPrompt then
|
if EditSearch.Text <> rsExSearchPrompt then
|
||||||
KeyWordSearch()
|
KeyWordSearch()
|
||||||
else EditSearch.SetFocus;
|
else EditSearch.SetFocus;
|
||||||
|
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Must add a FormClose event
|
{ Must add a FormClose event
|
||||||
|
Loading…
Reference in New Issue
Block a user