anchor.diff:  end;
   
   procedure TfpgWidget.MsgMouseDown(var msg: TfpgMessageRec);
  +var
  +  mb: TMouseButton;
   begin
     case msg.Params.mouse.Buttons of
       MOUSE_LEFT:
  +      begin
  +        mb := mbLeft;
           HandleLMouseDown(msg.Params.mouse.x, msg.Params.mouse.y, msg.Params.mouse.shiftstate);
  +      end;
       MOUSE_RIGHT:
  +      begin
  +        mb := mbRight;
           HandleRMouseDown(msg.Params.mouse.x, msg.Params.mouse.y, msg.Params.mouse.shiftstate);
  -  end;
  +      end;
  +    MOUSE_MIDDLE:
  +      begin
  +        mb := mbMiddle;
  +      end;
  +  end;
  +  if Assigned(FOnMouseDown) then
  +    FOnMouseDown(self, mb,
  +        GetKeyboardShiftState(msg.Params.mouse.shiftstate),
  +        Point(msg.Params.mouse.x, msg.Params.mouse.y));
   end;
   
   procedure TfpgWidget.MsgMouseUp(var msg: TfpgMessageRec);
  +var
  +  mb: TMouseButton;
   begin
     case msg.Params.mouse.Buttons of
       MOUSE_LEFT:
  +      begin
  +        mb := mbLeft;
           HandleLMouseUp(msg.Params.mouse.x, msg.Params.mouse.y, msg.Params.mouse.shiftstate);
  +      end;
       MOUSE_RIGHT:
  +      begin
  +        mb := mbRight;
           HandleRMouseUp(msg.Params.mouse.x, msg.Params.mouse.y, msg.Params.mouse.shiftstate);
  -  end;
  +      end;
  +    MOUSE_MIDDLE:
  +      begin
  +        mb := mbMiddle;
  +      end;
  +  end;
  +  if Assigned(FOnMouseUp) then
  +    FOnMouseUp(self, mb,
  +        GetKeyboardShiftState(msg.Params.mouse.shiftstate),
  +        Point(msg.Params.mouse.x, msg.Params.mouse.y));
   end;
   
   procedure TfpgWidget.MsgMouseMove(var msg: TfpgMessageRec);
  
positive.code:   FAlign := alNone;
  //  OnKeyPress := nil;
  
    if (aowner <> nil) and (aowner is TfpgWidget) then
      FParent := TfpgWidget(aowner)
    else
      FParent := nil;
  
  
negative.code:   TfpgWidget = class(TfpgWindow)
    private
      FAlignRect: TfpgRect;
      FOnMouseDown: TMouseButtonEvent;
      FOnMouseEnter: TNotifyEvent;
      FOnMouseExit: TNotifyEvent;
      FOnMouseMove: TMouseMoveEvent;
      FOnMouseUp: TMouseButtonEvent;
      FOnPaint: TPaintEvent;
      FOnScreen: boolean;
      procedure   MsgPaint(var msg: TfpgMessageRec); message FPGM_PAINT;
  