You've already forked lazarus-ccr
CalLite: Add readme.txt. Less hints.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5313 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
6
components/callite/README.txt
Normal file
6
components/callite/README.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
TCalendarLite is a light-weight calendar component, a TGraphicControl
|
||||||
|
descendant which consequently is not dependent on any widgetset.
|
||||||
|
It is not a fixed-size component, as are most calendars, but will align
|
||||||
|
and resize as needed.
|
||||||
|
|
||||||
|
License: modified LGPL (with linking exception)
|
@ -9,7 +9,6 @@
|
|||||||
<Title Value="CalLiteTest"/>
|
<Title Value="CalLiteTest"/>
|
||||||
<ResourceType Value="res"/>
|
<ResourceType Value="res"/>
|
||||||
<UseXPManifest Value="True"/>
|
<UseXPManifest Value="True"/>
|
||||||
<Icon Value="0"/>
|
|
||||||
</General>
|
</General>
|
||||||
<i18n>
|
<i18n>
|
||||||
<EnableI18N LFM="False"/>
|
<EnableI18N LFM="False"/>
|
||||||
@ -58,6 +57,7 @@
|
|||||||
<Linking>
|
<Linking>
|
||||||
<Debugging>
|
<Debugging>
|
||||||
<DebugInfoType Value="dsDwarf2Set"/>
|
<DebugInfoType Value="dsDwarf2Set"/>
|
||||||
|
<UseExternalDbgSyms Value="True"/>
|
||||||
</Debugging>
|
</Debugging>
|
||||||
<Options>
|
<Options>
|
||||||
<Win32>
|
<Win32>
|
||||||
|
@ -12,7 +12,7 @@ object Form1: TForm1
|
|||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnResize = FormResize
|
OnResize = FormResize
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '1.7'
|
LCLVersion = '1.6.0.4'
|
||||||
object edtYear: TEdit
|
object edtYear: TEdit
|
||||||
Left = 122
|
Left = 122
|
||||||
Height = 18
|
Height = 18
|
||||||
|
@ -6,7 +6,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
||||||
LclType, Buttons, StdCtrls, ComCtrls, Grids, DateUtils, CalendarLite;
|
LclType, Buttons, StdCtrls, DateUtils, CalendarLite;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -17,8 +17,8 @@ type
|
|||||||
edtMonth: TEdit;
|
edtMonth: TEdit;
|
||||||
Label1: TLabel;
|
Label1: TLabel;
|
||||||
procedure btnCloseClick(Sender: TObject);
|
procedure btnCloseClick(Sender: TObject);
|
||||||
procedure edtYearKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure edtYearKeyDown(Sender: TObject; var Key: Word; {%H-}Shift: TShiftState);
|
||||||
procedure edtMonthKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure edtMonthKeyDown(Sender: TObject; var Key: Word; {%H-}Shift: TShiftState);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure FormResize(Sender: TObject);
|
procedure FormResize(Sender: TObject);
|
||||||
private
|
private
|
||||||
@ -64,7 +64,7 @@ begin
|
|||||||
|
|
||||||
MonthsList:= TStringList.Create;
|
MonthsList:= TStringList.Create;
|
||||||
for I:= 0 to 11 do begin
|
for I:= 0 to 11 do begin
|
||||||
MonthsList.Add(AnsiToUTF8(ShortMonthNames[I+1]));
|
MonthsList.Add(AnsiToUTF8(FormatSettings.ShortMonthNames[I+1]));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
AYear:= YearOf(Now);
|
AYear:= YearOf(Now);
|
||||||
|
@ -302,10 +302,15 @@ end;
|
|||||||
|
|
||||||
procedure TCalDrawer.CalcSettings;
|
procedure TCalDrawer.CalcSettings;
|
||||||
var
|
var
|
||||||
rem, i, cellWidths, totalSpace, cw, cellHeights, hSpc,
|
rem: Integer = 0;
|
||||||
adjSpace, sp, borderh, borderv, ch, numRows: integer;
|
hSpc: Integer = 0;
|
||||||
sz: TSize;
|
ch: Integer = 0;
|
||||||
|
sp: Integer = 0;
|
||||||
|
cw: Integer = 0;
|
||||||
bit: integer=0;
|
bit: integer=0;
|
||||||
|
i, cellWidths, totalSpace, cellHeights,
|
||||||
|
adjSpace, borderh, borderv, numRows: integer;
|
||||||
|
sz: TSize;
|
||||||
begin
|
begin
|
||||||
if (FOwner.BiDiMode = bdLeftToRight) then
|
if (FOwner.BiDiMode = bdLeftToRight) then
|
||||||
FTStyle.RightToLeft:= False
|
FTStyle.RightToLeft:= False
|
||||||
@ -448,13 +453,15 @@ end;
|
|||||||
|
|
||||||
procedure TCalDrawer.DrawDayCells;
|
procedure TCalDrawer.DrawDayCells;
|
||||||
var
|
var
|
||||||
r, c, startCol, startRow, startSpan: integer;
|
remDays: integer = 0;
|
||||||
|
startRow: Integer = 0;
|
||||||
|
holidays: THolidays = 0;
|
||||||
|
r, c, startCol, startSpan: integer;
|
||||||
rec: TRect;
|
rec: TRect;
|
||||||
s: string;
|
s: string;
|
||||||
dow, y, m, d: word;
|
dow, y, m, d: word;
|
||||||
partWeeks, remDays: integer;
|
partWeeks: Integer;
|
||||||
dt, todayDate: TDateTime;
|
dt, todayDate: TDateTime;
|
||||||
holidays: THolidays;
|
|
||||||
begin
|
begin
|
||||||
todayDate := Date;
|
todayDate := Date;
|
||||||
dow := DayOfWeek(FOwner.FDate);
|
dow := DayOfWeek(FOwner.FDate);
|
||||||
@ -850,7 +857,7 @@ begin
|
|||||||
2: PrevMonth;
|
2: PrevMonth;
|
||||||
3..5:
|
3..5:
|
||||||
begin
|
begin
|
||||||
GetMonthYearRects(Rm, Ry);
|
GetMonthYearRects(Rm{%H-}, Ry{%H-});
|
||||||
if PtInRect(Rm, p) then begin
|
if PtInRect(Rm, p) then begin
|
||||||
FOwner.PopulateMonthPopupMenu;
|
FOwner.PopulateMonthPopupMenu;
|
||||||
ppopup := FOwner.ClientToScreen(Point(Rm.Left, Rm.Bottom));
|
ppopup := FOwner.ClientToScreen(Point(Rm.Left, Rm.Bottom));
|
||||||
@ -1097,7 +1104,7 @@ var
|
|||||||
item: TMenuItem;
|
item: TMenuItem;
|
||||||
m, d, dayCount: Integer;
|
m, d, dayCount: Integer;
|
||||||
population: integer = 0;
|
population: integer = 0;
|
||||||
hols: THolidays;
|
hols: THolidays = 0;
|
||||||
dt: TDateTime;
|
dt: TDateTime;
|
||||||
begin
|
begin
|
||||||
with FPopupMenu.Items do begin
|
with FPopupMenu.Items do begin
|
||||||
|
Reference in New Issue
Block a user