You've already forked lazarus-ccr
RxFPC: new component - TRxtextHolder
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6710 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
BIN
components/rx/trunk/demos/RxTextHolder/project1.ico
Normal file
BIN
components/rx/trunk/demos/RxTextHolder/project1.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
91
components/rx/trunk/demos/RxTextHolder/project1.lpi
Normal file
91
components/rx/trunk/demos/RxTextHolder/project1.lpi
Normal file
@@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="11"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<AutoCreateForms Value="False"/>
|
||||
<Title Value="project1"/>
|
||||
<Scaled Value="True"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<UseFileFilters Value="True"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="0"/>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="5">
|
||||
<Item1>
|
||||
<PackageName Value="LazControls"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="rxtools"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="rxnew"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<PackageName Value="rx"/>
|
||||
</Item4>
|
||||
<Item5>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item5>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<Target>
|
||||
<Filename Value="project1"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
21
components/rx/trunk/demos/RxTextHolder/project1.lpr
Normal file
21
components/rx/trunk/demos/RxTextHolder/project1.lpr
Normal file
@@ -0,0 +1,21 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, Unit1, rx, rxnew, lazcontrols;
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Scaled:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
BIN
components/rx/trunk/demos/RxTextHolder/project1.res
Normal file
BIN
components/rx/trunk/demos/RxTextHolder/project1.res
Normal file
Binary file not shown.
127
components/rx/trunk/demos/RxTextHolder/unit1.lfm
Normal file
127
components/rx/trunk/demos/RxTextHolder/unit1.lfm
Normal file
@@ -0,0 +1,127 @@
|
||||
object Form1: TForm1
|
||||
Left = 542
|
||||
Height = 292
|
||||
Top = 225
|
||||
Width = 383
|
||||
Caption = 'RxTextHolder demo'
|
||||
ClientHeight = 292
|
||||
ClientWidth = 383
|
||||
LCLVersion = '2.1.0.0'
|
||||
object Button1: TButton
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 6
|
||||
Height = 29
|
||||
Top = 6
|
||||
Width = 51
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Line 1'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 0
|
||||
end
|
||||
object Memo1: TMemo
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Button1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 251
|
||||
Top = 41
|
||||
Width = 383
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
Lines.Strings = (
|
||||
'Memo1'
|
||||
)
|
||||
ReadOnly = True
|
||||
TabOrder = 1
|
||||
end
|
||||
object Button2: TButton
|
||||
AnchorSideLeft.Control = Button1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 63
|
||||
Height = 29
|
||||
Top = 6
|
||||
Width = 51
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Line 1'
|
||||
OnClick = Button2Click
|
||||
TabOrder = 2
|
||||
end
|
||||
object Button3: TButton
|
||||
AnchorSideLeft.Control = Button2
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 120
|
||||
Height = 29
|
||||
Top = 6
|
||||
Width = 51
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Line 1'
|
||||
OnClick = Button3Click
|
||||
TabOrder = 3
|
||||
end
|
||||
object Button4: TButton
|
||||
AnchorSideLeft.Control = Button3
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 177
|
||||
Height = 29
|
||||
Top = 6
|
||||
Width = 51
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Line 1'
|
||||
OnClick = Button4Click
|
||||
TabOrder = 4
|
||||
end
|
||||
object RxTextHolder1: TRxTextHolder
|
||||
Items = <
|
||||
item
|
||||
Caption = 'Line 1'
|
||||
Lines.Strings = (
|
||||
'Line 1'
|
||||
'Line 1'
|
||||
'Line 1'
|
||||
'Line 1'
|
||||
'Line 1'
|
||||
)
|
||||
end
|
||||
item
|
||||
Caption = 'Line 2'
|
||||
Lines.Strings = (
|
||||
'Line 2'
|
||||
' Line 2'
|
||||
' Line 2'
|
||||
'Line 2'
|
||||
)
|
||||
end
|
||||
item
|
||||
Caption = 'Line 3'
|
||||
Lines.Strings = (
|
||||
'Line 3'
|
||||
' Line 3'
|
||||
'Line 3'
|
||||
' Line 3'
|
||||
'Line 3'
|
||||
)
|
||||
end
|
||||
item
|
||||
Caption = 'Line 4'
|
||||
Lines.Strings = (
|
||||
'Line 4'
|
||||
'Line 4'
|
||||
'Line 4'
|
||||
'Line 4'
|
||||
)
|
||||
end>
|
||||
Left = 16
|
||||
Top = 16
|
||||
end
|
||||
end
|
62
components/rx/trunk/demos/RxTextHolder/unit1.pas
Normal file
62
components/rx/trunk/demos/RxTextHolder/unit1.pas
Normal file
@@ -0,0 +1,62 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, StrHolder,
|
||||
RxHistoryNavigator, RxTextHolder, db;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
Button3: TButton;
|
||||
Button4: TButton;
|
||||
Memo1: TMemo;
|
||||
RxTextHolder1: TRxTextHolder;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure Button3Click(Sender: TObject);
|
||||
procedure Button4Click(Sender: TObject);
|
||||
private
|
||||
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.Button1Click(Sender: TObject);
|
||||
begin
|
||||
Memo1.Text:=RxTextHolder1['Line 1'];
|
||||
end;
|
||||
|
||||
procedure TForm1.Button2Click(Sender: TObject);
|
||||
begin
|
||||
Memo1.Text:=RxTextHolder1['Line 2'];
|
||||
end;
|
||||
|
||||
procedure TForm1.Button3Click(Sender: TObject);
|
||||
begin
|
||||
Memo1.Text:=RxTextHolder1['Line 3'];
|
||||
end;
|
||||
|
||||
procedure TForm1.Button4Click(Sender: TObject);
|
||||
begin
|
||||
Memo1.Text:=RxTextHolder1['Line 4'];
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user