mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 00:38:10 +02:00
Examples: Improved usability of demo "openurltest".
git-svn-id: trunk@54878 -
This commit is contained in:
parent
cd4add856f
commit
5377b0e786
@ -1,12 +1,12 @@
|
||||
object Form1: TForm1
|
||||
Left = 257
|
||||
Height = 248
|
||||
Height = 254
|
||||
Top = 177
|
||||
Width = 320
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 248
|
||||
ClientHeight = 254
|
||||
ClientWidth = 320
|
||||
LCLVersion = '1.1'
|
||||
LCLVersion = '1.9.0.0'
|
||||
object btnOpenURLHTTP: TButton
|
||||
Left = 64
|
||||
Height = 25
|
||||
@ -18,21 +18,21 @@ object Form1: TForm1
|
||||
end
|
||||
object editFileName: TFileNameEdit
|
||||
Left = 8
|
||||
Height = 21
|
||||
Height = 23
|
||||
Top = 32
|
||||
Width = 280
|
||||
FilterIndex = 0
|
||||
HideDirectories = False
|
||||
ButtonWidth = 23
|
||||
NumGlyphs = 0
|
||||
NumGlyphs = 1
|
||||
MaxLength = 0
|
||||
TabOrder = 1
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 8
|
||||
Height = 14
|
||||
Height = 15
|
||||
Top = 9
|
||||
Width = 216
|
||||
Width = 234
|
||||
Caption = 'Please indicate a filename or URL for testing:'
|
||||
ParentColor = False
|
||||
end
|
||||
@ -65,7 +65,7 @@ object Form1: TForm1
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 9
|
||||
Height = 14
|
||||
Height = 15
|
||||
Top = 58
|
||||
Width = 35
|
||||
Caption = 'Result:'
|
||||
@ -73,7 +73,7 @@ object Form1: TForm1
|
||||
end
|
||||
object editResult: TEdit
|
||||
Left = 9
|
||||
Height = 21
|
||||
Height = 23
|
||||
Top = 80
|
||||
Width = 279
|
||||
TabOrder = 5
|
||||
|
@ -39,16 +39,6 @@ implementation
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.btnOpenURLHTTPClick(Sender: TObject);
|
||||
begin
|
||||
editResult.Text := BoolToStr(OpenURL('www.google.com'));
|
||||
end;
|
||||
|
||||
procedure TForm1.btnOpenDocumentClick(Sender: TObject);
|
||||
begin
|
||||
editResult.Text := BoolToStr(OpenDocument(editFilename.Text));
|
||||
end;
|
||||
|
||||
procedure TForm1.btnFindBrowserClick(Sender: TObject);
|
||||
var
|
||||
lStr, lParams: String;
|
||||
@ -57,9 +47,25 @@ begin
|
||||
editResult.Text := lStr + ' ' + lParams;
|
||||
end;
|
||||
|
||||
procedure TForm1.btnOpenURLHTTPClick(Sender: TObject);
|
||||
begin
|
||||
if editFileName.Text = '' then
|
||||
editFileName.Text := 'www.google.com';
|
||||
editResult.Text := BoolToStr(OpenURL(editFileName.Text), true);
|
||||
end;
|
||||
|
||||
procedure TForm1.btnOpenDocumentClick(Sender: TObject);
|
||||
begin
|
||||
if editFileName.Text = '' then
|
||||
editFileName.Text := 'mainform.pas';
|
||||
editResult.Text := BoolToStr(OpenDocument(editFilename.Text), true);
|
||||
end;
|
||||
|
||||
procedure TForm1.btnOpenURLFILEClick(Sender: TObject);
|
||||
begin
|
||||
editResult.Text := BoolToStr(OpenURL('file://'+editFilename.Text));
|
||||
if editFileName.Text = '' then
|
||||
editFileName.Text := ExpandFileName('./mainform.pas');
|
||||
editResult.Text := BoolToStr(OpenURL('file://'+editFilename.Text), true);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -52,7 +52,7 @@
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
<Options>
|
||||
|
Loading…
Reference in New Issue
Block a user