You've already forked lazarus-ccr
CalLite: Fix behavior of right mouse click.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5373 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -135,10 +135,10 @@ procedure TForm1.FormCreate(Sender: TObject);
|
||||
var
|
||||
opt: TCalOption;
|
||||
begin
|
||||
demoCal:= TCalendarLite.Create(Self);
|
||||
demoCal.Parent:= Self;
|
||||
demoCal.Left:= 10;
|
||||
demoCal.Top:= PSettings.Height + 10;
|
||||
demoCal := TCalendarLite.Create(Self);
|
||||
demoCal.Parent := Self;
|
||||
demoCal.Left := 10;
|
||||
demoCal.Top := PSettings.Height + 10;
|
||||
demoCal.Width := seWidth.Value;
|
||||
demoCal.Height := seHeight.Value;
|
||||
demoCal.OnGetHolidays := @GetHolidays;
|
||||
@ -153,12 +153,12 @@ begin
|
||||
if CbDrawCell.Checked then
|
||||
demoCal.OnDrawCell := @DrawCell else
|
||||
demoCal.OnDrawCell := nil;
|
||||
FNoHolidays:= False;
|
||||
FNoHolidays := False;
|
||||
for opt in demoCal.Options do
|
||||
if (opt in demoCal.Options) then cgOptions.Checked[integer(opt)] := True;
|
||||
seHeight.Value := demoCal.Height;
|
||||
seWidth.Value:= demoCal.Width;
|
||||
rgStartingDOW.ItemIndex:= integer(demoCal.StartingDayOfWeek)-1;
|
||||
seWidth.Value := demoCal.Width;
|
||||
rgStartingDOW.ItemIndex := integer(demoCal.StartingDayOfWeek)-1;
|
||||
|
||||
copyCal:= TCalendarLite.Create(Self);
|
||||
copyCal.Parent := Self;
|
||||
|
@ -284,7 +284,6 @@ type
|
||||
|
||||
protected
|
||||
procedure ChangeDateTo(ADate: TDate; ASelMode: TCalSelMode);
|
||||
procedure Click; override;
|
||||
procedure DateChange; virtual;
|
||||
procedure DblClick; override;
|
||||
class function GetControlClassDefaultSize: TSize; override;
|
||||
@ -1288,7 +1287,7 @@ begin
|
||||
FMonthNames := TStringList.Create;
|
||||
FDisplayTexts := TStringList.Create;
|
||||
FDisplayTexts.StrictDelimiter := True;
|
||||
FDisplayTexts.Delimiter := '|';
|
||||
FDisplayTexts.Delimiter := ',';
|
||||
SetDefaultDisplayTexts;
|
||||
FPopupMenu := TPopupMenu.Create(Self);
|
||||
FCalDrawer := TCalDrawer.Create(Canvas);
|
||||
@ -1399,15 +1398,6 @@ begin
|
||||
Invalidate;
|
||||
end;
|
||||
|
||||
procedure TCalendarLite.Click;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
// Multi-select is handled by DblClickTimer
|
||||
if not FMultiSelect then //and not FDblClickTimer.Enabled then
|
||||
InternalClick;
|
||||
end;
|
||||
|
||||
procedure TCalendarLite.DateChange;
|
||||
begin
|
||||
if Assigned(FOnDateChange) then
|
||||
@ -1531,12 +1521,13 @@ begin
|
||||
if not Focused and not(csNoFocus in ControlStyle) then
|
||||
SetFocus;
|
||||
|
||||
if FMultiSelect then begin
|
||||
FClickPoint := Point(X, Y);
|
||||
FClickShift := Shift;
|
||||
FClickButton := Button;
|
||||
FDblClickTimer.Enabled := true;
|
||||
end;
|
||||
if FMultiSelect then
|
||||
FDblClickTimer.Enabled := true
|
||||
else
|
||||
InternalClick;
|
||||
end;
|
||||
|
||||
procedure TCalendarLite.MouseEnter;
|
||||
|
Reference in New Issue
Block a user