anchor.diff:    I, J, K, LeftAdj, TopAdj: Integer;
   begin
     LeftAdj := (PopUp_ObjectsPalette.Width - fObjPaletteTableSize.X*65 - 25*Byte(ObjectsPalette_Scroll.Visible)) div 2;
  -  TopAdj := (PopUp_ObjectsPalette.Height - GetVisibleRowsCount*85 - 75) div 2;
  +  TopAdj := ObjectsPalette_Image.Top + 25;
   
     K := 0;
   
  
positive.code: 
    fObjPaletteTableSize := KMPoint(ColsCnt, RowsCnt);
  
    EmptySpaceHeight := Max(0, PopUp_ObjectsPalette.Height - GetVisibleRowsCount*85 - 75);
  
    ObjectsPalette_Label.Top := EmptySpaceHeight div 4;
    ClosePalette_Button.Top := PopUp_ObjectsPalette.Bottom - 50 - (EmptySpaceHeight div 4);
  
    ObjectsPalette_Scroll.MaxValue := ((fCountCompact - 1) div ColsCnt) + 1 - RowsCnt;
  
  
negative.code: end;
  
  
  function TKMMapEdTerrainObjects.GetObjPaletteTableHeight: Integer;
  begin
    Result := 85*Min(fObjPaletteTableSize.Y, ((fCountCompact - 1) div fObjPaletteTableSize.X) + 1);
  end;
  
  
  function TKMMapEdTerrainObjects.GetObjPaletteTableWidth: Integer;
  begin
    Result := 65*fObjPaletteTableSize.X;
  end;
  
  
  