anchor.diff:  
   
   //Check if control is covered by other controls or not
  -//We assume that control is covered if any of his 4 angles are covered
  -//Use Self coordinates to check, because some controls can contain other controls (f.e. TKMNumericEdit)
  +//We assume that control is covered if any of his 4 angles is covered
  +//Use Self coordinates to check, because some controls can contain other sub-controls (f.e. TKMNumericEdit)
   function TKMMasterControl.IsCtrlCovered(aCtrl: TKMControl): Boolean;
   begin
  -  Result := (HitControl(aCtrl.SelfAbsLeft, aCtrl.SelfAbsTop) = aCtrl)
  -        and (HitControl(aCtrl.SelfAbsLeft + aCtrl.SelfWidth - 1, aCtrl.SelfAbsTop) = aCtrl)
  -        and (HitControl(aCtrl.SelfAbsLeft, aCtrl.SelfAbsTop + aCtrl.SelfHeight - 1) = aCtrl)
  -        and (HitControl(aCtrl.SelfAbsLeft + aCtrl.SelfWidth - 1, aCtrl.SelfAbsTop + aCtrl.SelfHeight - 1) = aCtrl);
  -  Result := not Result;
  +  Result := (HitControl(aCtrl.SelfAbsLeft, aCtrl.SelfAbsTop) <> aCtrl)
  +        or (HitControl(aCtrl.SelfAbsLeft + aCtrl.SelfWidth - 1, aCtrl.SelfAbsTop) <> aCtrl)
  +        or (HitControl(aCtrl.SelfAbsLeft, aCtrl.SelfAbsTop + aCtrl.SelfHeight - 1) <> aCtrl)
  +        or (HitControl(aCtrl.SelfAbsLeft + aCtrl.SelfWidth - 1, aCtrl.SelfAbsTop + aCtrl.SelfHeight - 1) <> aCtrl);
   end;
   
   
  
positive.code: end;
  
  
  //Update focused control
  procedure TKMMasterControl.UpdateFocus(aSender: TKMControl);
    function FindFocusable(C: TKMPanel): Boolean;
      //Check If Control if it is allowed to be focused on
      function IsFocusAllowed(aCtrl: TKMControl): Boolean;
      begin
        Result := aCtrl.fVisible
              and aCtrl.Enabled
              and aCtrl.Focusable
              and not IsCtrlCovered(aCtrl); // Do not allow to focus on covered Controls
      end;
  
      procedure SetCtrlFocus(aI: Integer);
      begin
        CtrlFocus := C.Childs[aI];
        Result := True;
      end;
  
    var I, CtrlToFocusI: Integer;
    begin
      Result := False;
      CtrlToFocusI := -1;
      //Check for focusable controls
      for I := 0 to C.ChildCount - 1 do
        if IsFocusAllowed(C.Childs[I]) and (
          (C.FocusedControlIndex = -1)                          // If FocusControl was not set (no focused element on panel)
          or (C.FocusedControlIndex = C.Childs[I].ControlIndex) // We've found last focused Control
          or (CtrlToFocusI <> -1)) then                         // We did find last focused Control on previos iterations
        begin
          if C.Childs[I].IsMarkedToUnfocus then
          begin
            CtrlToFocusI := I;
            C.Childs[I].IsMarkedToUnfocus := False;
            Continue;
          end else begin
            SetCtrlFocus(I); // We find next possible Control to focus on, then exit
            Exit;
          end;
        end;
  
      // If we did not find next possible Control to focus on, try to find in the first controls of Panel (let's cycle the search)
      if CtrlToFocusI <> -1 then
      begin
        // We will try to find it until the same Control, that we find before in previous For cycle
        for I := 0 to CtrlToFocusI do // So if there will be no proper controls, then set focus again to same control with I = CtrlToFocusI
          if IsFocusAllowed(C.Childs[I]) then
          begin
            SetCtrlFocus(I);
            Exit;
          end;
      end;
  
      for I := 0 to C.ChildCount - 1 do
  
negative.code:   if Visible and fEnabled then
    begin
      //Mark self as CtrlOver and CtrlUp, don't mark CtrlDown since MouseUp manually Nils it
      Parent.fMasterControl.CtrlOver := Self;
      Parent.fMasterControl.CtrlUp := Self;
      if Assigned(fOnClick) then fOnClick(Self);
      Result := true; //Click has happened
    end
  