You've already forked lazarus-ccr
jvcllaz: Add TJvYearGrid
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6241 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
1
components/jvcllaz/design/JvJans/images/images.txt
Normal file
1
components/jvcllaz/design/JvJans/images/images.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
tjvyeargrid.bmp
|
1
components/jvcllaz/design/JvJans/images/make_res.bat
Normal file
1
components/jvcllaz/design/JvJans/images/make_res.bat
Normal file
@ -0,0 +1 @@
|
|||||||
|
lazres ../../../resource/jvjansreg.res @images.txt
|
BIN
components/jvcllaz/design/JvJans/images/tjvyeargrid.bmp
Normal file
BIN
components/jvcllaz/design/JvJans/images/tjvyeargrid.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
27
components/jvcllaz/design/JvJans/jvjansreg.pas
Normal file
27
components/jvcllaz/design/JvJans/jvjansreg.pas
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
unit JvJansReg;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
SysUtils;
|
||||||
|
|
||||||
|
procedure Register;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R ../../resource/jvjansreg.res}
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, JvDsgnConsts, JvYearGrid;
|
||||||
|
|
||||||
|
procedure Register;
|
||||||
|
begin
|
||||||
|
RegisterComponents(RsPaletteJvcl, [
|
||||||
|
TJvYearGrid
|
||||||
|
]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
46
components/jvcllaz/packages/jvjanslazd.lpk
Normal file
46
components/jvcllaz/packages/jvjanslazd.lpk
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<CONFIG>
|
||||||
|
<Package Version="4">
|
||||||
|
<PathDelim Value="\"/>
|
||||||
|
<Name Value="jvjanslazd"/>
|
||||||
|
<Type Value="RunAndDesignTime"/>
|
||||||
|
<Author Value="Original author: Jan Verhoeven [jan1 dott verhoeven att wxs dott nl]"/>
|
||||||
|
<CompilerOptions>
|
||||||
|
<Version Value="11"/>
|
||||||
|
<PathDelim Value="\"/>
|
||||||
|
<SearchPaths>
|
||||||
|
<IncludeFiles Value="..\run\JvJans"/>
|
||||||
|
<OtherUnitFiles Value="..\run\JvJans;..\design\JvJans"/>
|
||||||
|
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)\"/>
|
||||||
|
</SearchPaths>
|
||||||
|
</CompilerOptions>
|
||||||
|
<Description Value="Custom controls of the JVCL library (https://sourceforge.net/projects/jvcl/) (designtime code of Jan's Components):
|
||||||
|
- YearGrid"/>
|
||||||
|
<License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/>
|
||||||
|
<Version Major="1" Release="4"/>
|
||||||
|
<Files Count="1">
|
||||||
|
<Item1>
|
||||||
|
<Filename Value="..\design\JvJans\jvjansreg.pas"/>
|
||||||
|
<HasRegisterProc Value="True"/>
|
||||||
|
<UnitName Value="JvJansReg"/>
|
||||||
|
</Item1>
|
||||||
|
</Files>
|
||||||
|
<RequiredPkgs Count="3">
|
||||||
|
<Item1>
|
||||||
|
<PackageName Value="JvCoreLazD"/>
|
||||||
|
</Item1>
|
||||||
|
<Item2>
|
||||||
|
<PackageName Value="jvjanslazr"/>
|
||||||
|
</Item2>
|
||||||
|
<Item3>
|
||||||
|
<PackageName Value="FCL"/>
|
||||||
|
</Item3>
|
||||||
|
</RequiredPkgs>
|
||||||
|
<UsageOptions>
|
||||||
|
<UnitPath Value="$(PkgOutDir)"/>
|
||||||
|
</UsageOptions>
|
||||||
|
<PublishOptions>
|
||||||
|
<Version Value="2"/>
|
||||||
|
</PublishOptions>
|
||||||
|
</Package>
|
||||||
|
</CONFIG>
|
44
components/jvcllaz/packages/jvjanslazr.lpk
Normal file
44
components/jvcllaz/packages/jvjanslazr.lpk
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<CONFIG>
|
||||||
|
<Package Version="4">
|
||||||
|
<PathDelim Value="\"/>
|
||||||
|
<Name Value="jvjanslazr"/>
|
||||||
|
<Author Value="Original author: Jan Verhoeven [jan1 dott verhoeven att wxs dott nl]"/>
|
||||||
|
<CompilerOptions>
|
||||||
|
<Version Value="11"/>
|
||||||
|
<PathDelim Value="\"/>
|
||||||
|
<SearchPaths>
|
||||||
|
<OtherUnitFiles Value="..\run\JvJans"/>
|
||||||
|
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)\"/>
|
||||||
|
</SearchPaths>
|
||||||
|
</CompilerOptions>
|
||||||
|
<Description Value="Custom controls of the JVCL library (https://sourceforge.net/projects/jvcl/) (runtime code of Jan's Components):
|
||||||
|
- YearGrid"/>
|
||||||
|
<License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/>
|
||||||
|
<Version Major="1" Release="4"/>
|
||||||
|
<Files Count="2">
|
||||||
|
<Item1>
|
||||||
|
<Filename Value="..\run\JvJans\JvYearGrid.pas"/>
|
||||||
|
<UnitName Value="JvYearGrid"/>
|
||||||
|
</Item1>
|
||||||
|
<Item2>
|
||||||
|
<Filename Value="..\run\JvJans\JvYearGridEditForm.pas"/>
|
||||||
|
<UnitName Value="JvYearGridEditForm"/>
|
||||||
|
</Item2>
|
||||||
|
</Files>
|
||||||
|
<RequiredPkgs Count="2">
|
||||||
|
<Item1>
|
||||||
|
<PackageName Value="JvCoreLazR"/>
|
||||||
|
</Item1>
|
||||||
|
<Item2>
|
||||||
|
<PackageName Value="FCL"/>
|
||||||
|
</Item2>
|
||||||
|
</RequiredPkgs>
|
||||||
|
<UsageOptions>
|
||||||
|
<UnitPath Value="$(PkgOutDir)"/>
|
||||||
|
</UsageOptions>
|
||||||
|
<PublishOptions>
|
||||||
|
<Version Value="2"/>
|
||||||
|
</PublishOptions>
|
||||||
|
</Package>
|
||||||
|
</CONFIG>
|
BIN
components/jvcllaz/resource/jvjansreg.res
Normal file
BIN
components/jvcllaz/resource/jvjansreg.res
Normal file
Binary file not shown.
@ -529,7 +529,7 @@ type
|
|||||||
property OnChange: TNotifyEvent read FOnChange write FOnChange;
|
property OnChange: TNotifyEvent read FOnChange write FOnChange;
|
||||||
end;
|
end;
|
||||||
{ end JvGraph }
|
{ end JvGraph }
|
||||||
|
*)
|
||||||
type
|
type
|
||||||
// equivalent of TPoint, but that can be a published property
|
// equivalent of TPoint, but that can be a published property
|
||||||
TJvPoint = class(TPersistent)
|
TJvPoint = class(TPersistent)
|
||||||
@ -610,7 +610,7 @@ type
|
|||||||
property Width: Longint read FWidth write SetWidth default 0;
|
property Width: Longint read FWidth write SetWidth default 0;
|
||||||
property Height: Longint read FHeight write SetHeight default 0;
|
property Height: Longint read FHeight write SetHeight default 0;
|
||||||
end;
|
end;
|
||||||
|
(*
|
||||||
{ begin JvCtrlUtils }
|
{ begin JvCtrlUtils }
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
@ -6790,7 +6790,7 @@ begin
|
|||||||
else
|
else
|
||||||
Result := Value;
|
Result := Value;
|
||||||
end;
|
end;
|
||||||
end;
|
end; *)
|
||||||
|
|
||||||
//=== { TJvPoint } ===========================================================
|
//=== { TJvPoint } ===========================================================
|
||||||
|
|
||||||
@ -7011,7 +7011,7 @@ begin
|
|||||||
DoChange;
|
DoChange;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
(*
|
||||||
function SelectColorByLuminance(AColor, DarkColor, BrightColor: TColor): TColor;
|
function SelectColorByLuminance(AColor, DarkColor, BrightColor: TColor): TColor;
|
||||||
var
|
var
|
||||||
ACol: Longint;
|
ACol: Longint;
|
||||||
|
1618
components/jvcllaz/run/JvJans/JvYearGrid.pas
Normal file
1618
components/jvcllaz/run/JvJans/JvYearGrid.pas
Normal file
File diff suppressed because it is too large
Load Diff
118
components/jvcllaz/run/JvJans/JvYearGridEditForm.lfm
Normal file
118
components/jvcllaz/run/JvJans/JvYearGridEditForm.lfm
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
object YearGridEditForm: TYearGridEditForm
|
||||||
|
Left = 303
|
||||||
|
Height = 367
|
||||||
|
Top = 154
|
||||||
|
Width = 394
|
||||||
|
BorderStyle = bsDialog
|
||||||
|
Caption = 'YearGrid Edit'
|
||||||
|
ClientHeight = 367
|
||||||
|
ClientWidth = 394
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Color = clWindowText
|
||||||
|
OnShow = FormShow
|
||||||
|
Position = poScreenCenter
|
||||||
|
LCLVersion = '1.9.0.0'
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Height = 35
|
||||||
|
Top = 332
|
||||||
|
Width = 394
|
||||||
|
Align = alBottom
|
||||||
|
AutoSize = True
|
||||||
|
ClientHeight = 35
|
||||||
|
ClientWidth = 394
|
||||||
|
TabOrder = 0
|
||||||
|
object BtnOK: TBitBtn
|
||||||
|
AnchorSideTop.Control = BitCancel
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
AnchorSideRight.Control = BitCancel
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
Left = 241
|
||||||
|
Height = 26
|
||||||
|
Top = 4
|
||||||
|
Width = 62
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Left = 16
|
||||||
|
BorderSpacing.Right = 4
|
||||||
|
Caption = 'OK'
|
||||||
|
Default = True
|
||||||
|
Kind = bkOK
|
||||||
|
ModalResult = 1
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object BitCancel: TBitBtn
|
||||||
|
AnchorSideTop.Control = Panel1
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
AnchorSideRight.Control = Panel1
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 307
|
||||||
|
Height = 26
|
||||||
|
Top = 4
|
||||||
|
Width = 82
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
BorderSpacing.Right = 4
|
||||||
|
BorderSpacing.Bottom = 4
|
||||||
|
Cancel = True
|
||||||
|
Caption = 'Cancel'
|
||||||
|
Kind = bkCancel
|
||||||
|
ModalResult = 2
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object BtnLoad: TButton
|
||||||
|
AnchorSideLeft.Control = Panel1
|
||||||
|
AnchorSideTop.Control = BtnOK
|
||||||
|
AnchorSideBottom.Control = BtnOK
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
Left = 5
|
||||||
|
Height = 26
|
||||||
|
Top = 4
|
||||||
|
Width = 61
|
||||||
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Left = 4
|
||||||
|
Caption = '&Load...'
|
||||||
|
OnClick = BtnLoadClick
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object BtnSave: TButton
|
||||||
|
AnchorSideLeft.Control = BtnLoad
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideTop.Control = BtnLoad
|
||||||
|
AnchorSideBottom.Control = BtnLoad
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
Left = 70
|
||||||
|
Height = 26
|
||||||
|
Top = 4
|
||||||
|
Width = 59
|
||||||
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Left = 4
|
||||||
|
BorderSpacing.Right = 16
|
||||||
|
Caption = '&Save...'
|
||||||
|
OnClick = BtnSaveClick
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object MemoText: TMemo
|
||||||
|
Left = 0
|
||||||
|
Height = 332
|
||||||
|
Top = 0
|
||||||
|
Width = 394
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object OpenDialog: TOpenDialog
|
||||||
|
Filter = 'Text Files|*.txt|All Files|*.*'
|
||||||
|
left = 88
|
||||||
|
top = 104
|
||||||
|
end
|
||||||
|
object SaveDialog: TSaveDialog
|
||||||
|
DefaultExt = '.txt'
|
||||||
|
Filter = 'Text Files|*.txt|All Files|*.*'
|
||||||
|
left = 120
|
||||||
|
top = 104
|
||||||
|
end
|
||||||
|
end
|
85
components/jvcllaz/run/JvJans/JvYearGridEditForm.pas
Normal file
85
components/jvcllaz/run/JvJans/JvYearGridEditForm.pas
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
{-----------------------------------------------------------------------------
|
||||||
|
The contents of this file are subject to the Mozilla Public License
|
||||||
|
Version 1.1 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for
|
||||||
|
the specific language governing rights and limitations under the License.
|
||||||
|
|
||||||
|
The Original Code is: JvYearGridEdit.PAS, released on 2002-06-15.
|
||||||
|
|
||||||
|
The Initial Developer of the Original Code is Jan Verhoeven [jan1 dott verhoeven att wxs dott nl]
|
||||||
|
Portions created by Jan Verhoeven are Copyright (C) 2002 Jan Verhoeven.
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s): Robert Love [rlove att slcdug dott org].
|
||||||
|
|
||||||
|
You may retrieve the latest version of this file at the Project JEDI's JVCL home page,
|
||||||
|
located at http://jvcl.delphi-jedi.org
|
||||||
|
|
||||||
|
Known Issues:
|
||||||
|
-----------------------------------------------------------------------------}
|
||||||
|
// $Id$
|
||||||
|
|
||||||
|
unit JvYearGridEditForm;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
SysUtils, Classes, Windows, Messages, Graphics, Controls,
|
||||||
|
Forms, Dialogs, StdCtrls, Buttons, ExtCtrls,
|
||||||
|
JvComponent;
|
||||||
|
|
||||||
|
type
|
||||||
|
TYearGridEditForm = class(TForm) //JvForm)
|
||||||
|
Panel1: TPanel;
|
||||||
|
BtnOK: TBitBtn;
|
||||||
|
BitCancel: TBitBtn;
|
||||||
|
MemoText: TMemo;
|
||||||
|
BtnLoad: TButton;
|
||||||
|
BtnSave: TButton;
|
||||||
|
OpenDialog: TOpenDialog;
|
||||||
|
SaveDialog: TSaveDialog;
|
||||||
|
procedure BtnLoadClick(Sender: TObject);
|
||||||
|
procedure BtnSaveClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
public
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.lfm}
|
||||||
|
|
||||||
|
procedure TYearGridEditForm.BtnLoadClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if OpenDialog.Execute then
|
||||||
|
MemoText.Lines.LoadFromFile(OpenDialog.FileName);
|
||||||
|
MemoText.SetFocus;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TYearGridEditForm.BtnSaveClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if SaveDialog.Execute then
|
||||||
|
MemoText.Lines.SaveToFile(SaveDialog.FileName);
|
||||||
|
MemoText.SetFocus;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TYearGridEditForm.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
MemoText.SetFocus;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{$IFDEF UNITVERSIONING}
|
||||||
|
initialization
|
||||||
|
RegisterUnitVersion(HInstance, UnitVersioning);
|
||||||
|
|
||||||
|
finalization
|
||||||
|
UnregisterUnitVersion(HInstance);
|
||||||
|
{$ENDIF UNITVERSIONING}
|
||||||
|
|
||||||
|
end.
|
Reference in New Issue
Block a user