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:
wp_xxyyzz
2018-03-13 00:10:34 +00:00
parent d041eee65c
commit 67811dddf6
11 changed files with 1944 additions and 4 deletions

View File

@ -529,7 +529,7 @@ type
property OnChange: TNotifyEvent read FOnChange write FOnChange;
end;
{ end JvGraph }
*)
type
// equivalent of TPoint, but that can be a published property
TJvPoint = class(TPersistent)
@ -610,7 +610,7 @@ type
property Width: Longint read FWidth write SetWidth default 0;
property Height: Longint read FHeight write SetHeight default 0;
end;
(*
{ begin JvCtrlUtils }
//------------------------------------------------------------------------------
@ -6790,7 +6790,7 @@ begin
else
Result := Value;
end;
end;
end; *)
//=== { TJvPoint } ===========================================================
@ -7011,7 +7011,7 @@ begin
DoChange;
end;
end;
(*
function SelectColorByLuminance(AColor, DarkColor, BrightColor: TColor): TColor;
var
ACol: Longint;

File diff suppressed because it is too large Load Diff

View 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

View 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.