anchor.diff:  type
   
     TfpgOnDateSetEvent = procedure(Sender: TObject; const ADate: TDateTime) of object;
  -  
  +  TfpgOnCheckboxChangedEvent = procedure(Sender: TObject; const AIsChecked: Boolean) of object;
  +
   
     TfpgPopupCalendar = class(TfpgPopupWindow)
     private
  
positive.code: //    FCheckBox: TfpgCheckbox;
      FChecked: boolean;
      FCheckBoxRect: TfpgRect;
      procedure   InternalCheckBoxChanged(Sender: TObject);
      procedure   SetChecked(const AValue: Boolean);
    protected
      procedure   DoDrawText(const ARect: TfpgRect); override;
      procedure   InternalOnValueSet(Sender: TObject; const ADate: TDateTime); override;
      procedure   HandleKeyPress(var keycode: word; var shiftstate: TShiftState; var consumed: boolean); override;
      procedure   HandlePaint; override;
    public
      constructor Create(AOwner: TComponent); override;
    published
      property    Checked: Boolean read FChecked write SetChecked;
      property    OnKeyPress;
    end;
  
  
negative.code:   begin
      consumed := True;
      Checked := False;
      DoCheckboxChanged;
    end;
    inherited HandleKeyPress(keycode, shiftstate, consumed);
  end;
  
  procedure TfpgCalendarCheckCombo.HandlePaint;
  var
    img: TfpgImage;
    ix: integer;
  begin
    inherited HandlePaint;
    // calculate which image to paint.
    if Enabled then
      ix := Ord(FChecked)
    else
      ix := (2 + (Ord(FChecked) * 2)) - Ord(FChecked);
  
    // paint the check (in this case a X)
    img := fpgImages.GetImage('sys.checkboxes');    // Do NOT localize
    Canvas.DrawImagePart(FCheckBoxRect.Left, FCheckBoxRect.Top, img, ix*13, 0, 13, 13);
  end;
  
  procedure TfpgCalendarCheckCombo.HandleResize(AWidth, AHeight: TfpgCoord);
  begin
    inherited HandleResize(AWidth, AHeight);
    FCheckBoxRect.Top := (AHeight - FCheckBoxRect.Height) div 2;
    OffsetRect(FCheckboxRect, 0, 3);  // frame border must be taken into consideration
  end;
  
  procedure TfpgCalendarCheckCombo.HandleLMouseDown(x, y: integer;
    shiftstate: TShiftState);
  begin
    if PtInRect(FCheckBoxRect, Point(x,y)) then
      // do nothing
    else
      inherited HandleLMouseDown(x, y, shiftstate);
  end;
  
  procedure TfpgCalendarCheckCombo.HandleLMouseUp(x, y: integer;
    shiftstate: TShiftState);
  begin
    if PtInRect(FCheckBoxRect, Point(x,y)) then
    begin
      Checked := not FChecked;
      DoCheckboxChanged;
    end
    else
      inherited HandleLMouseUp(x, y, shiftstate);
  end;
  
  constructor TfpgCalendarCheckCombo.Create(AOwner: TComponent);
  begin
    inherited Create(AOwner);
    FChecked := True;
    FCheckBoxRect.SetRect(2, 0, 17, 17);
    FCheckboxRect.Top := (FHeight - FCheckBoxRect.Height) div 2;
    OffsetRect(FCheckboxRect, 2, 3);  // frame border must be taken into consideration
  
  {
    FCheckBox := TfpgCheckBox.Create(self);
    with FCheckbox do
  